May I know why do you think spamming keys when opening the program will make it less likely to happen? Perhaps you have an idea what causes the issue?
Ah, figured it out. It’s the edge panning feature that made it move, I just didn’t notice the mouse was at the edge of the screen when the game opened.