Part of the reason women didn't fight-even ignoring the clear physical differences as well as social attitudes was because of the risk entailed. Going to war and losing 50,000 men is a tragedy, losing 50,000 women in a single day is a near extinction level calamity. That's women who won't be having children and thus ensuring the nation, tribe or kingdom survives.
Not to mention-fantasy especially has often a very sanitized idea of what war is like-its not all or even mostly glorious battles, its camping in the mud, digging ditches and marching for hundreds of miles.
Imagine women in Alexander the great's army, marching from Greece to India. Now realize how frailer women are, how much more emotionally vulnerable, as well as things like pregnancies, STIs and menstrual cycles. Imagine females trying to stay upright in the Gedrosian desert, or crossing the Hindu kush mountains, or braving India's jungles. Looks absurd doesn't it?
Even if you invented a fantasy egalitarian nation-it would inevitably struggle for these reasons, so most pop culture fantasy/anime/video games don't address the grind work of what being a warrior or soldier entailed. The non combat risks, as well as the clear demographic ones-the Romans losing 80,000 men is something replaceable-80,000 young women dying at Cannae is genuinely apocalyptic-men can be replaced due how human reproduction works, mass female losses would destroy a society's ability to perpetuate itself.
Even the mythical Amazons had male slaves, and cut off (at least one IIRC of their breasts). The only way to make women equal in pre modern combat times-is to make them superhuman in some form or another, which is fine depending on setting.
But don't let anyone tell you women could fight or even wanted too in an era where holding a pike mattered, where keeping your kit on your back in snow and burning heat was expected, and where discipline wasn't admonishment-it was a lashing.
Women simply would not have survived either physically or psychologically in pre modern warfare in any large scale.