Comment by muzani
I've had more trouble with other ICs rather than leaders.
It was a staff engineer role, very well paid. I was given a take home task for one interview. I did my research and looked into why they were hiring. I downloaded their app, read all the bad reviews on responsiveness, UI, and such. I built something in one hour that would solve the things they had trouble with over 4 years, as a kind of demo of what I could do if they took me.
When we had the actual interview, holy shit did they attack me. "Open your code on this file. Explain what is wrong with your code. I will not even give a hint otherwise you fail. You must tell me what is wrong with your code."
I did get them to explain the "correct answer" despite the pressure, and they were very reluctant to do so. I checked the code afterwards and even cross-checked it with AI and discovered that they were probably wrong lol.
It wasn't age. It wasn't racism, sexism, etc. It was a technical leader being challenged by the idea of someone else being technically better than them. Juniors can do work as fast as seniors; it's more that seniors are trusted to change culture for the better. If someone has trouble finding someone senior enough, most of the time it's because they refuse to let an outsider change the culture.
I did eventually get another job. Similar situation. Take home interview, vastly modernized code architecture than what the interviewer was used to. But in this case, the interviewer actually wanted to make products, get sales, make the customers happy, make money. So the incentives were aligned and they were happy to bring me in to set up policies and stuff.