so uh there is a problem where the game runs only when I build it in sublime text or run it in IDLE idk why
Sounds like an issue with your IDE. If the executable works and the source works in IDLE, it's on your end.