It’s a pretty simple problem. The folks claiming it is not either are being intentionally disingenuous or honestly do not understand the legal definition of derivative works in copyright. It’s settled law.
You could… you know either a) don’t train on works you don’t have a license to or b) use some sort of adversarial training to ensure that the AI doesn’t replicate the work it is trained on.