I see it as something akin to a painter studying someone else's work, then reproducing some of the techniques invented by the original artist... except that their techniques didn't have a license I guess?
I think I am not equipped to fully understand the legal boundaries between inspiration and theft, and I think most programmers are in the same situation.
Now if changes are so significant it becomes impossible to recognize the reference then that could be legit. Though based on how Copilot works I don't think that can be assumed, or even proven. When I studied art the teachers usually taught us to begin with our own original photograph, ideally without trademarked items, for reference.
And even in literature or journalism one must quote sources, even if paraphrased. I was taught to put down any inspiring work and only begin my own work after taking a break, to reduce the likelihood of unintentionally copying the original.