If Claude looks at the code when it does it, then you can still sue them. I don't think there's a "Claude Clean Room" product that trains on everything except the code you might be accused of copying.
I can't just translate Harry Potter to Spanish and sell it.
And yet: https://github.com/ultraworkers/claw-code