Remember that if there is a complaint such as copyright infringement, that still must go through the normal court process. Only the copyright holder can sue, and not everyone chooses to do so.
They must prove how/why the code is infringing, and then a judge/jury makes a subjective determination on things like fair use, transformation etc. to determine just how similar/different the code is, how obvious it is, if a human is likely to have come up with the same code independently, if there are any monetary damages to collect/etc.
There is no blanket law that says LLM-generated code cannot be copyrighted. And how the model got the code in the first place is largely irrelevant here.