No-one has checked in court of AI-generated code is copyrightable.
Personally I hope it's not. To me, this is the best outcome for AI in general. If we are going to violate everyone's copyright training AIs, then it's only fair you don't get AI protection on the output.