I spent the first 7 years of my career in the public sector. Talk about a career killer.
If you are concerned about getting a job elsewhere, just study and do online coding exercises like crazy. That should land you a job at most companies with whiteboard interview at your seniority level.
If you are concerned about actual learning, most of my professional growth has been on the job.
I spent a long while doing 'proactive learning' where I would study new techs and frameworks. It turns out that all of them, either I never had to use, or when I had to, I needed a refresher, since I forgot most about it. Lately I have been doing more 'reactive learning', where I learn new things as I need them, or studying general topics that can be broadly applied.
Long story short, look for positions that will stretch your abilities, you'll be fine.