If your mouse cursor does not lock to a game on Windows 11/10, Enable LUA, Update or reinstall the Mouse and Touchpad driver, Disable Mouse Precision, etc.
Windows 10 and Windows 11 have had their share of problems. According to the Microsoft Security Response Center (MSRC), the operating system experienced nearly 1280 security vulnerabilities in 2023.