If the sample of the Metallica song is insubstantial enough then you may well prevail in court.
It's unsurprising that copilot can reproduce the most famous subroutine of all time precisely, given that it occurs in hundreds or thousands of repos.
Also that code is not copyrightable. Pure algorithms are not copyrightable, copyright of code arises from its literary qualities.
E.g. I can copy an algorithm out of an ISO spec and that doesn't make my code a derivative work of the spec requiring me to pay royalties to ISO.
When you strip out the algorithmic elements out of fast inverse sqrt, you are left with what? Single letter variable names. That is certainly far below the threshold for copyright.