The game actually tracks mouse delta, so it is not effected by the end of screen. The issue is that a sudden drop of framerate causes the delta value to spike. Something somewhere in the code is causing the framerate to be over compensated.
Viewing post in The Hike jam comments
No, it does indeed track mouse delta, but it's not the frames being weird
Think about it, your mouse is all the way on the right side of your screen at like x = 1280, y = 200, and then teleports to the other side of the screen to x = 0, y = 200, turning your mouse delta to (-1280, 0), causing the giant flip
It's not lagspikes, just start spinning in circles and you'll see it happens constantly
The mouse doesn't teleport though. When there's a lag spike, the mouse moves much more in one frame because that frame is longer. Something in the code is overcompensating for that and making it jump. The cursor is snapped back to center every frame, so it never reaches an edge. If you move the camera around when there's no lag spike, there will be no jumping around. There is no teleporting of the muse cursor. Some games have that, this one doesn't.