Hold on, there is a difference between “recreate” and “copy”. Copyright only applies to creative expressions. If the code is trivially “recreated”, it’s not particularly creative.
Copyrighted content can be used without the holder’s permission under “Fair Use”.
Don’t assume all code can be copyrighted. Purely functional expressions are not copyrightable. Code is math.
There’s a lot here to unpack.