I had my game lagging for like two weeks for seemingly no reason, and after searching for a bit, it turns out that running the game in borderless window instead of fullscreen was the reason. I always assumed it would be the opposite.