A few misconceptions in this thread vs official advice.
A landside transit, even if it involves changing ports (i.e LHR to LGW) is permitted. As long as you can prove that you have onward travel, I doubt there will be an issue (
link to official gov.uk site). This would include having separate tickets.
I've travelled to the UK a few times since March 2020 and not once have I been asked to show a passenger locator form at check in. As long you have proof of a test (which you need) then I doubt you (anyone) would have an issue. Besides, if someone forgets to buy the tests/fill out the form, they can still do it in a corner at border control (vs. a pre-departure test).