The basic issue is highlighted in the video below. The mouse cursor will not re-center itself in Minecraft for Windows 10. This is a bug. You can find the bug report here
First install AutoHotKey from the AutoHotKey Website. Then, download this AutoHotKey script that I created.
Open the script with Notepad. Ensure that the keys 'E' and 'Escape' match your keybinds in Minecraft. For example, if you have 'X' bound to the pause button, you would need to change 'Escape' to 'X'. That goes for the inventory key as well. ENSURE THE KEYS IN THE SCRIPT AND GAME MATCH.
You may also need to change the number MouseMove lines there are depending on the speed and timings of your computer. Play around with the number until you have a value you like.
Run the script and launch Minecraft. You should now see that your cursor will be re-centered every time you open a UI screen.
**NOTE** This script only works in Maximized and Fullscreen windows. You will need to play around with the x and y values if you play in a non-maximized window.