I've seen this counter-point come up so many times. It's true, some times people might lie and be good at talking. Amongst programmers, though, that is simply not true, at least to the point of being frequent enough that we need to subject everyone to obnoxious whiteboard and leetcode interview formats.
And in the event of the [rare] mistake in hiring someone who does this, you will know quite quickly after they start and you will fire them. Problem solved.
Look, I only have anecdotes to offer, but based on my experience, you are simply wrong.
It might be a different place, a different market from yours, etc. But at least here (and I've verified this anecdote with numerous people), many people who have very high experience levels simply can't code, at all. Or at least, can't do it given the coding task we give them (2 hours with a computer and full internet access, to do a few tasks in Python).
I'm not saying that people are lying on their resumes - just that supposed experience in an impressive sounding company doesn't necessarily translate to real world coding ability.
That may be and it could just be coincidence or location or whatever. Don't get me wrong, though, I have definitely interviewed highly (well, supposedly) experienced software engineers who, when faced with actually writing and reading code, could barely understand. So, I acknowledge that it does happen but just that in my experience, not overly often.
In the times that I have seen it happen, though, I almost always wonder how the heck it's possible? Either they really did lie about their experience (possibly but let's assume not) OR they have worked at places that didn't interview well (?) somehow just skated by for years on end? Or maybe there is another possibility for why this happens.
And in the event of the [rare] mistake in hiring someone who does this, you will know quite quickly after they start and you will fire them. Problem solved.