It's usually easier than that, as one by default hold the copyright of their works. Typically a company doesn't need to provide the whole working process and files to the court to claim copyright over their published products / to accuse pirates for violation.
If you're on the defendant side of a copyright violation case, it's extremely hard to use "well the original author didn't really make it...* as a defense. (Patent cases are often defended with this argument though, as a patent grants far boarder protection than copyright and can be rejected on prior art. But still it's very different from "AI made this actually.")
> It's usually easier than that, as one by default hold the copyright of their works.
That's not what we're talking about.
This is a question of copyright eligibility in the first place. An excellent recent(ish) example is Oracle v Google wherein the former claimed copyright over the Java APIs. That particular litigation went on for years and ultimately went to the Supreme Court (though it ultimately ended on a fair use argument and the issue of API copyright eligibility was never settled).
We can probably assume similar high profile cases in the future that turn on quantifying the level of human contribution in code produced through the use of AI.
As for patents, it's literally that easy. Attacking authorship of a patent is an excellent way to invalidate it. It's why any company with a serious patent program requires staff to keep supporting notes for their work and confirm authorship in writing as part of the filing process.