It's an interesting question. Sexual dimorphism in humans is only abut 15%, where for gorillas it's 50%. And even so, in humans it's not absolute. About 11% of women are taller than the average man, and some small percentage of women are stronger than the average man - although clearly in general males do have significantly greater upper body strength. There's a lot of latitude along the continuum, but at the same time, males do tend to be larger and stronger over all - but it's not a complete binary.
Now that we have this new tooth enamel evaluation system it is easier to determine the sex of ancient remains, and we're realizing that many skeletons assumed to be male in the past because they were buried with weapons or with clearly high status were actual women. Many cultures have a history of women warriors - Japan is quite fond of theirs.
We know that current H/G tribes have gender roles, but also that they don't necessarily pay all that much attention to them since personal autonomy is a much more valued thing. These roles seem to have evolved to ensure that all that work gets done, and to allow for specialization, but if there's also a huge amount of flexibility, then what evolutionary purpose does sexual dimorphism serve? Perhaps it's just a residual from our primate past that contributed enough to our survival that it hung around. But you are correct, there's lots of evidence that most early humans had a broad array of survival skills and not just the ones coded for their sex. Since we're the only hominid species to actually survive, perhaps that is one of the reasons?
I don't know for certain, but thanks for asking the question.
Edit: There’s also this — the way that estrogen impacts height. I’d almost forgotten about that.