I honestly don’t know either.
I don’t know how it is in the UK. Here in the US, a hiring manager sees a gap in the resume and asks about that. This has been a problem for say, women who exited the workforce to take care of their kids and then attempt to reenter it. I suppose, even if there is no negative mark, if you have a stack of 30 or 40 resumes, you start using “relevant recent experience” as a way to filter down to the people you want to interview.
There is also a tendency for agism, worse in some industries or disciplines than in others — maybe some kind of cult of youth thing going on. (I have found that development teams favor younger developers, even for senior developers, while ops and devops tend to favor a slightly older crowd).
There is a great article explaining how a software developer can get better negotiating position that can potentially bypass that resume gap: https://www.kalzumeus.com/2012/01/23/salary-negotiation/
... but only because you can do this with software development, not necessarily with anything else.