That wouldn't save one from DMCA actions if it were music copyrights that they were infringing on. So it shouldn't save one for source code copyright infringement either.
Either we get to have things like Copilot, or we loosen copyright protections a great deal. Is there a third way?