The solution is - more objects wrapping more objects. I can already imagine people doing exactly that.
Dependency injection is the name of the game right? That's what videos on youtube are advocating...
But it's also a pain to pass everything that is needed down to functions, so let's stuff all the global state in a class and pass that class down!
I hope I just didn't get the sarcasm, really.