You are absolutely right. I should have phrased that differently. Derivative work is a legal term, but I misused it above. I should have either used another term or been clearer.
If the work is "derivative" in the legal sense it is copyrighted, and you may not create derivative works without the copyright holders permission.
What I should have said is that simply being inspired by a work or copying unprotectable elements (like facts or ideas) does not create a derivative work.
For example, if ChatGPT were to generate Star Wars, except with Dookies instead of Wookies, that might be illegal. If it were to learn what a spaceship is from Star Wars and then create something substantially new it would not. The key is is that it must not be substantially similar to the original. You must add enough value that it becomes something new, not just rehash the original.