It hasn't happened to me (yet), but I know it's a real issue. I have a friend who was very experienced in their field (hospitality), but was denied an opportunity for being in their 50s. The job was given to a younger, less talented and less experienced person.
That's totally wrong! Where I work, we've made it a point of duty to consider competence first during recruitment, then character before we get to talking about age.