if you modify enough of the output as to make it unrecognizable as the machine output -- that's a new work created by a human. i.e. you don't have to change every line.
same thing applies to sampling in music. if i change enough of a sample as to make it unrecognizable, then i don't need to worry about registering/licensing the sample.
for anything you want to be able to copyright, yes.
otherwise you can still prompt your agent things, but any output falls under public domain.
since this hype wave started some people have been saying don’t use these tools in an environment where you’re dealing with proprietary IP. did anyone listen? no. because shiny.