A good question, and as with most good questions they are hard to answer in a simple way.
Being a specialist makes for a pretty good career path. Employers know that you know your job. They won't hesitate working with you as long as you also get a long well with the other team members.
But the more you are known as a specialist the possibility that you will be considered as an asset for other types of work diminishes. If you are known as a great dialog editor, why should they risk using you as a sound effects editor rather than for dialog?
The same goes for an accomplished effects editor.
The tools and workflow for mangling and treating sounds are similar but rarely (if ever) the same when you compare what is done by a fx and dia editor.
How to bwcome one or the other?
Persoanlly I think it wil just "happen" to you. If you are the perfect one-man-band for documentaries and fast turn around projects you will be known as one.
If you are great at building a super soundtrack but perhaps not a tech wiz at designing your own sounds you are likely to become a fx editor.
If you do the above but also constantly produce fresh sound design elements and also have a good perception on how to effectively convey feelings with sounds. then you might be considered as a sound designer.
If you are great with rhythm, cadence, tonality, meticulous and fast at operating your daw, you are likely to be known as a dialog editor.
If you know most of the above, have a super personality, are great with scheduling have spent countless hours on a dub stage delivering material to various mixers, then you are a likely candidate for a sound supervisor post.
Mixers, they are the folks who don't want to spend the time creating all the material but love to claim the fame for a great soundtrack while being especially good at time managment... :-)
Personally, I've become a "do-it-all" person.
I started in music recording and mixing, transitioned to fx editing and foley recording, then became a dialog specialist, then assisted a lot in mixing, became a mixer, unsatisfied with certain sound effects editors job I decided to try to do better. So now I spend most of my time editing and designing sound effects. On projects I supervise I tend to mix as well. Occasionally I just mix. Right now I'm editing dialog only for a feature but I also supervise and handle the contacts with the director, mixer, composer and editor.
But I've become a "do-it-all" person out of necessity, as being full time employed as staff at a smallish (9 employees but growing) sound post company with a dub stage, 7 editing rooms and handling all aspects of sound to film and TV I need to be able to wear many hats. I'm also responsible for assessing workflow and also the brains behind all things technical at our facility. The only thing I don't do is record dialog on location.