We may just have to agree to disagree here -- you keep making these broad, absolute claims ("you will be kicked out of the game") that do not match reality as I've seen it. In this particular case, I've bounced back and forth between backend and frontend development repeatedly during my career -- two years out of frontend isn't even remotely unusual, and it's never stopped me. I just accept that yes, each time I come back, there is a new language and a new framework to learn. That's fun, IMO -- it's neat watching the field evolve and grow.
Mind, I'm not denying that what you describe is common -- I'm well aware that I'm a bit unusual. What I'm objecting to is that your message comes across as, "Just give up, you're doomed", which I think is incorrect and counter-productive -- it's totally doable to stay in the game, or to wander back into it later, if you want that and care about it.
It takes work, and yes, you have to keep learning -- but that's true in most forms of application programming; frontend is not especially unusual in that regard. (Yes, there are disciplines that change only relatively slowly, but they tend to be specialties.) Programming is very, very different from when I started, in pretty much all ways: I've worked through two paradigm shifts in the languages (Imperative -> OO -> FP), and software development processes shifted massively 20 years ago. I've learned all of that along the way; none of it was especially hard, since I've been picking it up steadily and gradually.
The question, fundamentally, is: do you enjoy lifelong learning, and are you prepared to keep doing that? If so, you can keep having a fulfilling programming career indefinitely, even if you like changing focus from time to time. (As I do.) If not, probably not -- in which case, yes, management track may be appropriate. (And you'll probably make more money that way.)
But it's not destiny: you should choose where you want your career to go, and make sure you do what is necessary to succeed in that track, whether it be keeping your technical skills sharp and current for the hands-on Architect track, or focusing more on the soft skills needed to excel at management.