There is no copyright in AI art. Presumably the same reasoning would apply to AI code:
https://iclg.com/news/22400-us-court-confirms-ai-generated-a...
The rest of the world might decide differently.
And as long as you're not worried about people in the USA reusing your code then you're all good!
It sounds like in this case the the guy claimed the AI was the sole author, and that's why there's no copyright. But if a human is using AI as a tool, then there can be copyright.