In the big picture, if we enter a world where an AI is instantly capable of doing code better than you do and without efforts, then I'm not sure why code should be copyrightable at all.
Copyright protects original works of authorship including literary, dramatic, musical, and artistic works, such as poetry, novels, movies, songs, computer software, and architecture.
Copyright does not protect facts, ideas, systems, or methods of operation, although it may protect the way these things are expressed.
Here (and in the future even more), AI is totally capable of expressing one idea in any programming language if you ask for it (even if conceptually inspired by copyrighted code).
Which means that a particular expression (a specific implementation) is practically of no value or particular interest at this stage.
You could ask the AI to do a slightly different implementation, it would not be a problem for it and would require no efforts.
There is no point to protect something that can be generated using no effort and has no particular genius in it.