> Just like rephrasing A Song ot Ice and Fire a bit, and switching to a different language, doesn't remove its copyright.

There is some precedent for this, e.g. Alchemised is a recent best seller that had just enough changed from its Harry Potter fan fiction source in order to avoid copyright infringement: https://en.wikipedia.org/wiki/Alchemised

(I avoided the term “remove copyright” here because the new work is still under copyright, just not Harry Potter - related copyright.)

That's apparently a different story with different plot, so that's not comparable.

Plots are broadly not copyrightable, “different plot” is less important than “different characters”.

I'm pretty sure the plot is copyrightable, otherwise you could just translate Harry Potter to a different language and change the names of the characters.