This feels very outdated. It was certainly an issue around the time of the NYT lawsuit, but I believe the companies responded hard to that "sanitize" their outputs to prevent obvious regurgitation like this. I'd be very surprised if you could reproduce this today.
This doesn't negate your point, but I believe the landscape has changed in response to this point.
The fundamental technology is identical to compression- an LLM can be thought of as a dense and slightly lossy compression algorithm. Compression is clearly copying.
I've not tried to do this with code recently but just a couple of days ago I had ChatGPT generate images of Warhammer 40k box art that was completely accurate and correct.
That doesn't make it better. If you plagiarize something and then hide this by replacing words with synonyms and rewording stuff a bit it is still plagiarized. It is just harder to detect and to proof.
It regurgitated the output earlier and they are still using the same technique only scaled up. If they somehow fixed the underlying problem, they'd probably shout it from the roof-tops.