Fixes #6649
I was able to reproduce the bug on Ubuntu 22.04, Ubuntu 22.10, Fedora 37 and Fedora 38 Beta with enabled Wayland SDL backend via `SDL_VIDEODRIVER=wayland`. It's reproducible even for an SDL sample, calling `SDL_SetWindowGrab(window, SDL_TRUE)` on a start makes it even more noticeable.
I think (I haven't written a pure Wayland sample yet) the problem is on the GNOME side (mutter). Particularly the confinement region is outdated for some reason until some event happened (for example window activation, it's enough to switch to another window and back without moving/resizing).
I've superficially checked SDL code and it seems it doesn't specify the confinement region if we don't call `SDL_SetWindowMouseRect` (nullptr for `confine_pointer` region). So the WM should calculate the region by itself which doesn't happen properly.
Refs #545