@Clay Thank you for confirming my point! I saw a comment by a user who claims, that Windows Applications which use UWP (Universal Windows Platform) misses an API feature to lock a mouse pointer to a window, or modifying the pointers position.
[WORKAROUND TUTORIAL]
For the Mouse Pointer to stay in the window, we will change the "Allow edge swipe" policy setting and launch the game in Fullscreen mode on a single monitor.
Prerequisites: Local Group Policy Editor (not included in Windows Home)
Press WIN+R
Type "gpedit.msc" in the box
Press "OK"
Navigate to "Local Computer Policy>Computer Configuration>Administrative Templates>Windows Components>Edge UI>Allow edge swipe"
Press "Edit policy setting"
Select "Disabled"
Press "Apply"
Press WIN+P
Select "PC screen only"
Launch the Game
Press F11 (alternatively navigate to "Settings>Video>Fullscreen" and make sure it's switched on.)
Now the Title- and Taskbar should stay hidden with every mouse movement.
I think this is the only workaround that works for Windows Apps so the Mouse Pointer stays in the window.
If there is anything I forgot, something I can add or another way to achieve this, let me know in the comments or shoot me a message!
It happens to me if I press WIN+G to open the Game Bar once and right after the cursor will always leave the window.
I saw that people also enabled LUA in the Registry Editor, but that didn't work for me as my value was already set to 1.
To check yours you'll need to open Registry Editor, navigate to the path "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", press "EnableLUA", make sure the value is set to 1 and press "OK". After that you will be prompted to restart your computer.