Copyright never guaranteed anyone compensation, nor is it loophole to not pay for copyright just because you saw and learned from something in the public domain.
If using someone else work for learning is infringement, then that's going to cause a lot of difficulty for all artists. Try making a rock song without listening to rock, or paint some modern art without viewing it etc.
Copyright exists to protect human authors and promote creation, which in turn leads to learning - from other human beings. Algorithms are not learning, they are automated tools which are consuming creative works and outputing derivative works.
The loophole is to use copyrighted works for free despite no learning taking place - no human being observing and developing their skills based on that work - rather, an algorithm transforming those works into some other useful interpretation of them.
If using someone else work for learning is infringement, then that's going to cause a lot of difficulty for all artists. Try making a rock song without listening to rock, or paint some modern art without viewing it etc.