Tech moves fast, there's no question. New languages, frameworks, ecosystems--it all develops at breakneck pace. It is simply impossible to keep up with all the things. Most of the technologists I know find something to deep-dive into, but also try to keep a pulse on what the broader community is doing.
To make it a career, it's almost required to find a groove and rock it for a long time. Time spent and code written (and tested and debugged and refactored) is what allows deep context, which is what defines an effective developer. But as it goes, the tech landscape changes, clients (internal or external) require new shiny things, previously developed deep-context is no longer relevant, and the meaning of life is lost forever! (Too dramatic? Maybe it's just me? I digress...)
When it's time to retool, do not lose heart! You did it once (or twice, or thrice), you can get back to being (and feeling) productive.