Flights from the UK connecting in Schengen airports are generally considered clean, so you can generally connect without going through security. You will go through immigration if you're connecting to a Schengen flight. It's been like that for years and I've always thought how unfair it was that it didn't work the other way round, that is Schengen flights to the UK connecting at LHR, particularly as transit security at T5 is anything but a pleasant experience.