It's developer error. It'd be the same as a game on Linux filling up a conf file or a database with duplicates. Does Linux have mechanisms to guard against that? Didn't think so.
If you install games via Flatpak, or via Steam which you've installed via Flatpak, they are indeed isolated in `~/.var/app/*`, IIRC.
But this thread is getting distracted. That's a separate issue, and the applications in question can still pollute all they want within their container.