The GitHub terms of service has always granted GitHub additional rights. If you put up code with a license incompatible with those rights, then you are the responsible party for the violation, again as per GitHub's terms of service.
This was true before AI, and the ToS now explicitly includes AI training to avoid confusion.
In short: it has never been a good idea to put anything with a copy left or strong license up on GitHub if you wanted them to abide by it.
> If you put up code with a license incompatible with those rights, then you are the responsible party for the violation, again as per GitHub's terms of service.
This is not how copyright law works or any other law for that matter. The issue is foremost between the copyright author and GitHub. The ToS may or may not allow GitHub to sue the uploader for damages for a ToS does not magically give them rights that the uploader isn't legally able to give.