This is a popular misreading of the state of the law.
Someone tried, as a bit of a stunt, to register a work for copyright with generative AI as the sole creator/author. That registration was rejected. This is quite different from a person using generative AI as a tool to create a work.
People have copyright in photos and videos they create, even if they used a camera. Same with images and code, even if they used an LLM.
I'm not your lawyer, but to the extent you have copyright in works you create, the fact that you used a tool doesn't diminish the copyright.
This isn't quite true: https://www.congress.gov/crs-product/LSB10922
The clearest part from the page:
> Before the proliferation of generative AI, U.S. courts did not extend copyright protection to various nonhuman authors, holding that a monkey who took photos of himself lacked standing to sue under the Copyright Act; that human authorship was required to copyright a book purportedly inspired by celestial beings; and that a living garden could not be copyrighted. The U.S. Copyright Office has also long maintained that copyrighted works must be "created by a human being" and therefore refused to register works that are "produced by a machine or mere mechanical process that operates randomly or automatically without any creative input or intervention from a human author."
I think the long story short is if you're incorporting LLM generated content into your own work, then your own work is copyrighted but if it's purely AI created and you never put any of your own work into it, it's not (so: think the slop cannons people are pointing at social media for example -- probably not copyrighted (although I don't know why you'd want to put your name on it anyway)). Granted, I don't know how you'd ever prove that something was purely LLM generated so it's kind of a technicality for coding, but for image and music I think it applies pretty clearly.
As an aside, I think socially maintaining that copyrights are for humans only is extremely important. It might be the most important legal matter around this. I see nothing good of allowing AI labs that have strip-mined the internet to claim a copyright on the things they regurgitate, and I don't think spammers deserve copyright protection either. The human-only requirement is a very good one.