bluemoon68 sets out the legal position perfectly, but I will add a practical side to this as well.
There are currently long queues at the UK border - anything up to two hours. No-one knows how long that situation will last. That will play havoc with any same day transit, so anyone attempting this would be wise to build in an overnight stay (which is doubtless sensible on separate tickets anyway).
Secondly, what are you going to do if UK Border Force refuses you entry? It’s really extremely unlikely, but the Home Office is taking a harder line on entry and policing and you may at least find yourself on the end of more invasive questioning than you’re used to.
Whatever you’re saving by pricing out separate flights you’re at least partially eating back into with hotel stays and transit costs (it’s not that cheap to go between LGW and LHR directly, and I don’t think I’d chance the cheaper circuitous routes via central London given they may not be regarded as ‘travelling directly’ in law). Ditto transfers from LTN and STN.
In return for this ever-diminishing saving you’re taking on a lot more risk and aggravation.
A simple airside transit at LHR avoids all these issues - you’d then only need a negative Covid test. Clearly it’s your choice, but at this point in time there’s a lot to be said for certainty and simplicity - it really is not that easy to travel around the UK without some form of impediment at the moment, and frankly with the infection rates in London you really don’t want to be on the Underground or a train in the capital!