I think this is a weird problem and you may not like my answer. over the past 10 years I've changed tech stacks at nearly every job/project I've done (in order)
Student/Teaching -> Security/Operating Systems -> Programming Languages -> Data Engineering -> Image Processing -> Machine Learning -> Language Processing -> Audio Processing -> Full Stack Development -> ?
(sprinkled part-time teaching positions throughout)
Often this cost me in pay, but usually had good other benefits. I worked for smaller companies, government work/contractors, independent contracting, prototypes whenever possible. Many companies advertise themselves as polyglots (this can help measure the culture you're applying into).
Changing domains dramatically will often result in changing technologies. Signal processing is often done in Matlab, Full stack has a very diverse set of technologies, but different combination at every company. Different applications of statistics have very different preferred technologies.
You have to get real comfortable with being the dumbest person in every room. Eventually you can end up on top, but for your first several opportunities can reset major parts of your market value.
Its a long game. Now my market value is my diversity. It took a lot of resets to get there. There are some recruiters/Hiring managers that don't like this, but there are just as many who do.