It is the interpretation of the Judicial Branch of the United States government and the United States Copyright Office, the best authority on copyright law in the United States.
But yes, much like every single other law in existence, it’s not universal. (I mean, unless we’re also talking about the laws of physics.)
And yes, if the AI generated code is a copy of copyrighted code, then it would still be copyrighted, but that’s an even worse problem for Codeberg than it being public domain.