Yes, but to sue for infringement, you must register the work with the Copyright Office, and the registration must specify clearly what's AI and what's human-created, and only the latter is protected.
As far as I know, if humans are having a discussion about the structure of the code and deliberately making changes (such as in github or on a forum) that represents human creativity. If you hit a button and then make literally no changes to the output then that might be different.