I noticed that toggle fullscreen always gets the primary monitor when its more intuitive to use the monitor that the window is currently in. (#1486)
This monitor should even probably be passed as an id instead to make it more consistent with the rest of the API but this would break existing applications so I am hesitant to change the function signature directly.