Yes, they share all information across the NHS spine.
There really isn’t an option to opt out, if you gave your NHS number, they can and will pull any information they think they need at any time.
If it concerns you, and you don’t want it linked, maybe check with your GP next time you have a checkup and tell them that’s not your contact information and you don’t know anything about it.
The data sharing in the NHS is a joke. They pulled my records after a visit and started to update them, but it was a completely different persons record in a different city who shared my name.