You can't grant permission for something you don't own. Uploading a copy of a GPLed work to GitHub does not grant GitHub permission to ignore the GPL. (It might grant GitHub permission to ignore your copyrights in that work, maybe, though it seems like a stretch to argue that "run Github's services" includes "give other people derivative works of all your code"; arguably that ought to be too broad for a contract of adhesion. There's case law about what you can and can't do in a unilaterally imposed contract such as a ToS; a ToS can't say "you owe us $100 if you browse more than twelve pages" either, and codebases can be worth far more than that.)
If GitHub started saying "one of our services is to give people access to copies of your code with the licenses and copyright notices removed", the GitHub ToS wouldn't suddenly make it acceptable to run that "service".
But I agree with part of your underlying point. All AI models should respect Open Source licenses. It's a problem if some try to work around that.
In Github's case for example, Github's TOS already includes a clause that if you upload code there, you grant Github a license to use the content to run Github's services... and copilot is one of them.
https://docs.github.com/en/site-policy/github-terms/github-t...
Such clauses are commonly found in social media where users can upload content. Think of imgur, instagam, reddit, etc. OpenAI might buy reddit, and declare ChatGPT a product of the reddit service, then all discussions on reddit could be used for the training of ChatGPT... while open models can't access the data.