But on the senior level companies complain they can't find good developers.
I'm a senior developer. Here's the problem as I see it in the senior recruitment arena: The majority of company HR departments and recruiters are bad at recruiting senior developers.
The modern tech landscape is filled with hundreds of different technologies technologies and tools. HTML, CSS, Javascript, hundreds of Node modules, PHP, Ruby on Rails, Linux, Windows, OSX, C++, Java, Python, Go, Rust, Perl, Git, Agile, Waterfall,.... the list is immense. No two companies use exactly the same tech stack but HR's job postings ("Required: <specific list of 18 technologies>") indicate they are filtering for someone from a company that does. It is reasonable for employers to expect that new technologies can be picked up on the fly but employers either don't seem to recognize this or are demanding someone who is going to be productive on hour 1 of their new position.
Another problem is that many recruiters and HR people think in terms of "years of experience" with each technology. This is a rather meaningless and often un-quantifiable metric for an engineering job. Example: I use Perl maybe once a month in the job I've held for the past 11 years, but only for a day and to write some "run once, throw away" type of script. I've known Perl for 20 years. How many years experience is that? There's no standard answer and no way to answer in "years of experience" that doesn't involve a lot of explanation and make the answer useless for comparison purposes - but someone who says they have 20 years Perl experience passes HR's resume filter while the more honest and nuanced answer does not.
Successful tech companies do not care about finding an exact match for their tech stack. They look for problem solving skills.