Repository: godot
Issue: (Windows 10) The horizontal position of the Godot window is miscalculated in multiscreen environment when dragging
Labels: bug,platform:windows,topic:porting

### Godot version

4.0 beta 6

### System information

Windows 10, Nvidia GeForce GTX 1650, drivers 31.0.15.1700, not sure which backend

### Issue description

This issue happens specifically in a multiscreen environment (more than one screen, extended display).

When Godot is open in fullscreen one one screen, then moving its window to the other screen while it's loading a project results in the said moving window to have its position miscalculated. Instead of being dragged under the mouse pointer, it can end up being dragged far away from the mouse pointer.

This is a problem because if **Godot Editor's window is being dragged far enough from the mouse pointer then it can be LOST off-screen.** If that happens thhen the only solution I know is to close Godot using its icon in the task bar, and re-open it. Some work could be lost this way.

See scenario below for full description.


### Steps to reproduce

1. Have two screens
2. Set the multiscreen environment as "extended display" (for example you have a main display device that we call "screen1". Screen 1 has Windows' task bar. We have an extra external display device that we call "screen 2". Screen 2 is set as extension of Screen 1 . We position Screen 2 "above" screen 1, both physically and software-wise in the Windows display settings)
3. Open Godot 4 mono 64 on the main screen (bottom screen, aka "screen 1")
4. Create an empty project. You are now in Godot editor with the project open.
5. Go back to "Projects list" window.
6. Double click on the project you just created. **For a few seconds the project gets loaded and the Godot window stops responding**
7. During that time, **quickly** drag the Godot editor window towards the top of the screen, and even beyond (to screen 2) (as you would do if you did that 10 times a day and had muscle memory of the gesture!). By "drag and drop", I mean click and hold mouse on title bar to start dragging Godot windows around, then move your mouse upwards.
10. Notice how as soon as it starts getting dragged, the window immediately exits fullscreen mode and goes back to "window-size"
**8. Expected (good) :** The window is right under the mouse, at the position where the mouse started dragging the window
**9. Observed (bad) :**  The window loses track of the mouse  pointer position. **When the Godot window starts responding again, it can be quite far away far to the right of the mouse pointer.** Starting from there, the wndow moves around with the same movements as the mouse while being dragged, but... mispositioned. However the relative position of the mouse and the window remain constant, proving that the window lost track of the mouse position only temporarily.
It doesn't seem to happen with other applications.

Working hypothesis : The Godot editor window has low-level rendering routines that don't listen to low-level Windows UI events at a **high-enough rate** . Godot's OS message pump is somehow blocked by the project loading process and loses track of mouse position update messages.


### Minimal reproduction project

An empty Godot 4 project is enough to reproduce the bug.