I don't know how to fix it but i know why the problem occurs . It is because if your mouse is not lockedand the mouse is moved then the value of Mouse Pointer Lock Movement X and Y change without the mouse actually moving. If you click on the game straight away than it will be normal