Switching a stack won't help cos places want years of experience.
Someone told me early in my career that "my grandkids will be maintaining PHP applications". He was probably right. You might be seeing less on the job boards nowadays, but half the web still runs on PHP.
I have a colleague who was at a place that had a decent PHP base. Several years old, but... it was mostly written by a couple of people, and it got... quite hairy. After 4-5 years, they brought in a very capable person, who began a lot of refactoring. But... he was still doing this primarily in isolation. The company was growing, but they kept treating the big monolith API ... as its own thing, and it kept getting harder to expand.
"We can't find good PHP people!". But... they weren't trying very hard. This was pre-pandemic, and they were requiring people to be onsite in most cases. Colleague pinged me last year - they started rebuilding in node "because it was easier to find people".
But... this was such a ... shifting of goal posts. The problem was not "PHP is bad", but letting one person write all your business logic in isolation from the rest of the company is bad. The node rebuild is a moderate size team, who have an existing API to code against, and they're all working, greenfield, with the latest/newest versions of everything. Somehow "node is better" is the lesson they're drawing from this.
My colleague had suggested "let's rebuild some portions of this monolith API as a group". "Nope, no time for that". Well... they made time, but decided that the language was the main root cause. I can guarantee if they'd let someone build large chunks of this on their own in isolation from everyone else for weeks/months at a time... they'd hit the same problems in the next year or so.
And so "PHP is dying" sort of becomes a self-fulfilling prophecy, at least in the eyes of some. Yet... I've been hearing it for 22 years. And it ain't going away. And yes, it's being used for new dev/projects. I'm scheduled to convert a java system over to PHP8 early next year.
This is not an immediate silver bullet, and I know COVID changed a lot of how we meet and interact. But... it may be something that helps someone out there.
There are plenty of legacy systems that people need to maintain, no matter what the tech stack is. As others say, network, network and network some more...