I had exactly the same issue.
It appears the first time yesterday after I opened the Windows/Xbox Game Bar on Windows 11 by pressing WIN+G for the first time (I never used the Game Bar so far since I updated to Windows 11). So I think that this appears after you have opened the Win11 Game Bar for the first time.
The mouse then could leave the fullscreen and went to the second monitor while gaming (Counter Strike 2 and also other games).
I found 2 workarounds to solve this issue:
- Only possible if you have a Windows Restore point before you opened the game bar by pressing WIN+G for the first time:
I've deinstalled the apps "Xbox", "Xbox Console companion" and "Xbox Live".
Then I run Windows PowerShell in Run as Administrator mode. Executed these 2 commands (https://techcult.com/how-to-disable-xbox-game-bar-in-windows-11/) to remove/deinstall GamBar:
Get-AppxPackage *Microsoft.XboxGameOverlay* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxGamingOverlay* | Remove-AppxPackage
Then I set my Windows 11 back to the point before I opend the game bar for the first time yesterday (by pressing WIN+G) using the windows built-in "system restore", in german "Sytemwiederherstellung" (Systemsteuerung\Alle Systemsteuerungselemente\Wiederherstellung).
After the restore was finished (about 30 minutes), the deinstalled XBox apps were back, also the Windows Game Bar. But the game bar was again in the state of never opened so far.
- I've tested Dual Monitor Tools (DMT) from here: https://dualmonitortool.sourceforge.net/.
Configured it like this: Options -> Cursor -> Sticky -> Lock cursor onto screen -> Change -> Enable this Hotkey -> Shift + Backspace.
Worked also for me.
Additional hint: For me CS2 (Counter Strike 2) works best on 2 monitors if I confiure it in the game settings -> video -> video -> display mode to "Fullscreen windowed" because in this mode the game window keeps open and doesn't get minimized if I focus another window on the 2nd screen, e.g. Discord.