I said "developers who stop learning become obsolete." I still think that's true, and it's more common than you think.
Imagine you have a comfortable job with a nice salary at a legacy company and your entire world is building SOAP APIs. It's easy to lose track of where the development world as a whole has migrated if your entire day-to-day is in legacy systems.
It's not that you have to learn some skills about JSON-based RESTful APIs (or even keep going into GraphQL). You also might have to learn new frameworks or languages that weren't present in your legacy system.
Over enough years of not keeping up, the learning gap grows quite large and your prior experience building SOAP APIs in PHP doesn't impress new companies looking for a GraphQL + Typescript developer.
Totally agreed that you have to work on the other parts of your life as well.