Didn't 4e solve that problem?
D&D solved it two different ways. And I think the 2nd was actually better.
The first way they solved it is they redefined "fighter" to mean "front line defender". And then they made the Ranger class for "Lightly Armored Skirmisher".
The second way they solved it was in the essentials era. In it, they made meaty subclasses.
The Fighter had 3 subclasses: the Knight, Slayer and Weaponmaster. Weaponmaster was the original fighter. They where all the same class; so they had access to similar feats, paragon paths and somewhat overlapping power selection (sometimes not, because 2 of them where simplified).
The Knight/Slayer where Fighters who specialize in defence and offence respectively. The Weaponmaster was defined by mechanical complexity really; if it was "regreened" it would probably lean into a more defined narrative.
If you imagine 4e starting with that essentials pattern, we get sort of what I wrote above.
The essentials era Ranger, which was a hybrid Primal/Martial character, was also clever. It split the martial part from the primal ones.
You could imagine a Ranger literally picking Martial powers from the same list as the Fighter-Archer would, or a Rogue-Scout. But they would also pick up Primal powers from a different list. With a 4e like budget system, your choice of Primal powers would mean you where not picking a Martial one, not your inability to pick a Martial power.
Now, throw in built-in hybridization here. A PC might pick a class and 2 specializations.
A Fighter (Archer + Primal Bond) could be a Ranger.
The core book might have pre-built packages of specializations. Fighter (Knight + Divine Oath) is a Paladin (Martial|Divine hybrid), Fighter (Knight + Exemplar of Might) is a different (pure martial) character.
Each of the specialization picks would give you your some level 1 class features, and influence what powers you can pick from.
This is easier in a 4e like system, because most of your advancement comes in the form of modular powers. In a 5e like system where advancement comes in new features which are often "always on", the combinatorics get harder to deal with.
Still, in 5e, you could imagine making subclasses a bit less tied to exact levels and making them beefy enough to support "Paladin".