Glocks have matching serial numbers on the plate, on the slide, and on the barrel. Getting the ones off the hardened steel is very hard to do, and most idiots trying to remove the one from the barrel are going to screw up the action.
Also just scratching the surface smooth is not enough, and most people screw that up. The stamping leaves strain marks in the metal under the surface, and these can be recovered from a completely smoothed surface.
For example https://www.horiba.com/int/science-in-action/raman-breakthro... and https://digitalcommons.wku.edu/cgi/viewcontent.cgi?article=2...
These are just the tip of the iceberg for recovery techniques.