If you legally change your name, then the new name is attached to the old social security number so that they will match. It is a government entity, so there is probably a bundle of paperwork attached, but it is legally now your name and it is also legally still your SSN, so they would need to match up. In government there is usually a way to get around everything....so there is likely some method to allow issuing of a replacement number, too, if someone really wanted to do so. Benefits attached to the old number might not transfer, but then some people might not care about that either.
jmo