I don't think that there is any regulation that force you to remain airside during a stopover, as long as you have the proper documents for entry in the UK.
Just make sure that you allow ample time to clear immigration and security when you return to LHR.
BTW, I believe that conformance time for BA is 35 minutes. And that is when your BP is checked in the security queue, somewhat before getting to the security machine, not after having cleared security. AB seems a bit more relaxed on conformance.