In the UK, if domestic and international travellers are mixed, you will have to have a photo taken whilst passing through security if you are connecting to a domestic flight. At the gate, they match this photo up with the one taken at security.
Details can be found here.
To strengthen the security of the United Kingdom border, airports that
operate common departure lounges must comply with UK Border Force
conditions that are necessary to prevent any circumvention of UK
immigration controls. This includes a requirement to capture a facial
biometric for each domestic passenger on entry and exit of a departure
lounge in order to verify their identity.
Update: I think there's some confusion in the other answers about what the question is exactly. Let's say you fly Boston - Heathrow - Paris. In this case you do not pass through immigration, but just a security and boarding pass check. You then board your flight to Paris where you would go through immigration.
The OP is asking what if you went through security and then attempted to board a domestic flight to, say, MAN, perhaps by swapping a boarding pass with someone else, or just using a second BP you'd already printed under a different ticket (though that will also result in failure due to Ready To Fly in LHR).
What will happen is that you will arrive at the gate with the intention of boarding your domestic flight. You will face the biometric camera and it will not recognise you and you will be denied boarding. The only way of exiting the airport will be through immigration.