Great Question and you are applauded for posting.
Let me put it this way. If the serial number was purposely scratched off and made illegible , then someone violated a law. If the serial number can be recovered by etching or other means, then, while it may have been obliterated, it may still be there. . . ... See. touchy subject huh. . .
Would a 'simple' restore job recover the serial number accurately. Would it take a forensic group some time, expertise and special acids?
These questions are rhetorical and I expect no answer from you.
I would assume that the serial number is still there, and if it was not readily made legible, I would approach a trusted LEO and see if they need the gun for training in forensics, then return it to you when it has been restored.
Wild Idea. . . worth a try.