I believe you are using Godot because of how the toggle full screen button acts and in development of my game, Buggy Boi, I had similar random movement but because of it, it dramatically reduced performance, to an unplayable game, but removing the constant random functions that happened evry frame fixed it. I believe this is what happened to your game; Although I have a pretty bad PC ($500 AUD)
My game is very similar to yours if you would like to try and rate it: https://k58.itch.io/buggy-boi