It depends on the code. You can’t copyright something functional like a for-loop. What you can copyright is the larger expressive, and arbitrary, structure of that code.
Copyright is not meant for utilitarian purposes. For that there are patents. The non-utilitarian, artistically expressive aspect of software is in how code is organized. You know, the rather arbitrary decisions that spawn hours of bike-shedding.
Copilot is most useful when it makes no creative decisions and instead follows the style and design patterns already established in the code base.