A truly epic battle, this game is underrated
But you should have locked the cursor like this:
Cursor.lockState = CursorLockMode.Locked;