When you run a game, the game is allowed to monitor your input (up to some configuration), so you shouldn’t e.g. open a game and do online banking at the same time.
I mean, once you invoke a game once outside a sandbox, all bets are off from that point on. It can modify your environment to do whatever from that point on. Like, it could, oh, modify your ~/.bashrc to invoke some keylogger binary that it drops off somewhere in your home directory. Just closing the game isn't going to be a reliable mechanism for preventing malware in a game from dicking with the system after that point.