I'm not sure I see the difference. The rule is that anything not produced by a human is not copyrightable and is in the public domain. If something is not copyrightable and in the public domain how can it be covered by copyright?
The difference is massive because the source material is covered by copyright. So even if the product can't be copyrighted there is a fair chance that you'll get your ass sued by whoever is able to trace back some critical part of that product to their own work of which yours is now a derived work.
I'm talking about original, greenfield projects that was entirely written by an AI agent. There is no source material here beyond the agent and prompting. Prompting, AFAIK, hasn't been considered sufficient to make it a human produced work.
Or are you getting at the idea that the works the AI was originally trained on could still be considered an original work the generated code was derived from? Like if the generate code happens to look like someones code in github, that they could sue? I'm not 100% on sources here but I thought this was already tested in court and ruled it wasn't infringement.