Hiring managers - have you ever "dinged" or turned down a candidate for a gap in their employment history?

Suppose you have a candidate, they interview really well, but there's a two year gap in their employment history. The rest of the history looks really good, but from, say, 2019-2021, they were unemployed.

If they answer, "I was let go, and then it took me two years to find a new position due to economics, COVID, and other factors out of my control." Is that bad? I am not asking "is it bad in general?" but more like, a red flag that you would not hire somebody who is otherwise a good fit?

Would it matter if they were currently unemployed?

Frankly, I am not sure why that advice was given, or if it's some old holdover no longer relevant. Shit happens to people. I can't think of a reason to red flag someone who was being honest. But maybe that's just a technical industry kind of thing.

I am soliciting opinions, gut feelings, something I am not seeing, historical precedence, and so on.