This question already has an answer here:
If I took the linux kernel, rewrite it and changed the order and file names and some other stuff, and destroy the original linux kernel, will the new kernel be subject to the terms of the GPL?
tl;dr: If I rewrite the linux kernel, change almost every line while keeping the same computation and delete the original kernel will the GPL apply to the new kernel?
Not a duplicate of Theseus' Paradox applied to code copyright as that is modifying the source without rewriting it. As far as I am aware the GPL has anti-circumvention measures for this too