one way to work around this is the gentlemen agreement, where everyone agrees to stay in their lane. casters could probably fight better than fighters with the right buffs, but they choose not to, and to do their thing instead.

and really, it's not easy to "accidentally" outperform a reasonably optimized fighter with a decent equipment. barring some of the crazier combos, you're not invading their lane much.