What part of the codebase are the tools reproducing? The copyrightable aspects of software is generally at the structural level and not at the function level as most independent functions are utilitarian and not expressive in nature.
If these tools were not context dependent they would not be very useful. These tools aim to only reproduce the non-copyrightable aspects of code and in a context-aware manner.
I have yet to see a case where Copilot has returned code that is something other than the kind of functional, utilitarian code that is explicitly not covered by copyright.
Patents? Perhaps! But that’s another discussion.
If the purpose of processing copyrighted works is to learn the underlying structure and produce further works that are not independently derivative then the courts have a history of judging in favor of fair use.
Copyright is about artistic expression and not functionality.