Don't worry about it - pretty much everything we learn has a finite lifespan. The job is partly about constantly learning, for better or worse. (At least my brain won't atrophy as I age, or so I tell myself.) Also the more you know the easier it is to pick up new things, everything is a bit like something else.
An incomplete list of tech I know that became pretty much useless: VB6, perl (controversial?), classic ASP, director/shockwave, actionscript 1/2/3, flex, silverlight, GWT, ember, XSLT.. And there must be more!
The good thing is, learning most of this stuff is free and easier than ever before. The big problem is picking something; if it takes 2-3 months to learn you want that to lead to at least 6 months of decently paid work.
Client side web stuff moves ridiculously quickly, but if I were you I'd probably learn React and something like Next JS or Gatsby. You'll be up against bootcamp people in the job market and your broader experience should stand out against them. Pick a common hosted CI service (github actions, circleci, whatever) and learn it in a couple of weekends, the free quotas are plenty for small projects. Learn enough about TDD in your chosen new tech that you can talk about it convincingly and demonstrate proficiency. Often you'll get grilled on it in the interview then find absolutely no sign of it happening once you get the job!
If you want something a bit slower moving, Android and iOS could be good - there's more to learn though, and often you'll end up having to deal with both and/or some hybrid native+HTML/JS monstrosity so that can go from lovely to evil quickly. I really like svelte at the moment, I was lucky to get a project it was a good fit for but it may not be a good "find a job soon" choice. I also have a couple of brightscript (Roku) projects on the go, that's horrible but my client couldn't find anyone else to do the work so I learned it a few years ago. It'll join my list of obsolete tech in the next few years but it's been worth it financially.
[Edit: Also, typescript]