from what I’ve gathered, having stumbled upon the same issue, it seems it’s a problem with this game since the very start. My workaround was to install “Dual Monitor Tools”, and set up a key binding to toggle on/off the limitation of the cursor to one monitor. That way, when the coursor starts to fly off, I just limit it manually to the game screen and the problem’s solved.
I’m not dismissing the possibility of software glitches and whatnot, but check your mouse. When my mouse cursor starts doing weird things like becoming intermittently unresponsive or flying away in odd directions, I usually discover that there’s a cat hair stuck in front of the sensor.