Making your code open source was consenting to have people (and AIs) read it and learn from it. As an open source developer myself, I always understood that.
So then the question becomes what "copying" means. There is an extensive body of legal precedent on this matter, and it mostly all points to "transformative uses" being exempt from copyright. For example, if I count the number of words in Fahrenheit 451, that number is not copyrighted. If I reproduce just a sentence, or maybe even a paragraph, that also doesn't count. But at a certain threshold, once I've reproduced enough of the book verbatim, I have violated copyright. Training an LLM is also a transformative use which means that it is simply not covered by copyright.