

IMO proprietary code has this same risk.
I have non FOSS projects that my company writes / sells (I’ve written these for over 20 years, but only owned them for 3, and opening the existing source is complicated as it’s tangled deeply with non OSS projects).
I don’t allow LLM generated code in our products either, since I have to assume that most of training was done on public repos, and there’s no way to know what licenses existed on that code (in addition to all of the other valid arguments to not use that shit).
I think the fundamental difference is that a human trained on something isn’t likely to reproduce the thing they were trained on exactly.
I know that some research I read a few years ago showed that LLMs generally produced novel text (rather than simply returning verbatim training material), but that that wasn’t always true, especially as the training sample got smaller, or a single training text got larger (something like a 1000 words).
So sure, for something simple like creating super standard CRUD or basic API endpoints in common languages, the sample size is significant enough that what you get is likely to be homogenized from thousands of samples available, and not likely to be an exact copy of someone else’s code. But the risk is that as the problem being solved gets more niche, and the training sample size gets smaller, you become more likely to get exact copies of someone else’s code, or something close enough that it might be considered plagiarism.
There’s also still grey areas where some courts in some areas have stated that LLM generated content can’t be copyrighted, since a human didn’t create it, creating issues with protecting sources with copyright.