It's not a problem. The serial number that is most important is the one on the receiver/frame.
If you were to send your Glock back for repair and it was determined that a new receiver was necessary they would swap out receivers and put your old barrel in that frame. The serial numbers would, obviously, not match. When you went to pick up your firearm from whatever store you sent it through for repair you would have to do another background check because you are, in a sense, picking up a new handgun.
If any law enforcement agency needed to "run" your firearm, this is how it would go.
They would call Glock and give them the serial number off of your frame and ask who they sold it to.
Glock would then probably inform them that that serial number was assigned to a repaired firearm and was sent directly to XYZ gunstore for ExactlyMyPoint customer. That would pretty much automatically tell them why the serial numbers are different.
If they wanted to dig deeper they could ask the serial number of the defective firearm, which Glock would have a record of showing that they repossessed it, meaning you don't have two Glocks.
If they wanted to go even further they could ask for the serial number of the old Glock frame and match it with your barrel (which I can't imagine why they'd need to do that), or they could ask for the distributor.. call the distributor and ask for the store it was sold to.. call the store and ask what customer it was sold to and come up with your name anyway.
People think that just because there is no registration that guns aren't traceable. You couldn't be further from the truth.
No, they can't pull a name out of a hat and find every firearm that person owns (unless there is registration in that state or you believe there is some secret registry that you don't know about (don't go there)), but if they have a serial number they can find out who bought it.
There are hundreds of people who swap out serialized parts on their firearms. The serialized parts tell the company if the firearm has been played with more so than the police.
If you send a firearm back for warranty repair and it's been messed with and the serialized parts are missing or replaced, then they know what might account for the problem... They aren't dealing with factor parts.
The only thing the LEO's want to know is that you are the true owner and got the gun legally.
There are certain exceptions to modifications, of course (like if you were to modify your firearm to being full-auto or something like that), but in general, having different numbers on your barrel and frame means nothing to police.