Flying with connections mostly within Schengen, or EU<>US via CDG, I never had to clear security again at layover, but I recently learnt this is rather an exception, and apparently it's a very common thing in most airports to have to clear security again.
LHR is actually notorious for this; you don't have to clear security again at LHR only when the connection is domestic.
In many other airports it's the same when e.g. you switch a terminal. Best to check for a particular airport what are the rules before booking.