Consider a new additional feature added on to Copilot - a language aware rewriting tool that transforms the initial generated code into a new form with equivalent functionality.
It would be nearly impossible to trace the original code or make a copyright claim.
However - you could use this same trick directly on copyrighted code. Now things are even murkier...
But I would argue that this is essentially what our brains are doing. I've read code, got the gist of it and written my own version. Technically it's not a clean-room reimplementation but an average coder wouldn't realistically expect to get sued for copyright for doing this.
Maybe they should but if you're an open source advocate and you've reached this position then there's something very weird going on.
I always thought the idea of open source was to use copyright against itself because we believed in openness. Not embracing it and just throwing out one small aspect of it.