You may have noticed that the Mouse cursor does not lock to the game window in Windows 11/10 at times. There are various instances of this issue. Sometimes, the mouse fails to lock in specific ...
Natively it is not possible to do that in Windows 11/10, but you can use a free tool named Lock Cursor Tools to lock the mouse cursor movement to a particular part of the desktop screen.