I think it could be helpful to distinguish more clearly between the question whether there is a medical knowledge gap with regard to biological sex differences and if there is such a gap, whether this is due to gender bias.
To my common sense (prone to errors) it appears to be obvious that when investigators in the past were including only one sex in their studies or when today one sex is over-represented in trials, then you simply cannot know whether the findings are equally relevant for the other sex. Otherwise the premise would be that beyond their different reproduction "equipment", there are no medically relevant biological differences between the sexes. However,
@Jonathan Edwards provided examples both for medical conditions in which the premise seems to apply (colon cancer surgery, microbial infection) , and others were it does not (autoimmunity.)
@Trish provided an article which states that signs indicating a heart attack can differ between the sexes. To me it appears that these differences could also occur because women and men perceive and desrcibe their symptoms differently. But this might not be true at all or only a partial explanation. Thus, to me two additional questions arise.
Firstly, is it really known in which medical conditions sex differences are relevant and in which not? If this is not known, then there would automatically always be a knowledge gap arising from trials in which one sex is over-represented. This then would be also true for medical conditions that are unequally distributed between the sexes unless the trials had sufficiently large female and male subsets (don't have a better wording ATM, hope it is clear what is meant?).
So the second question would be, (why) are medical studies in general not having female and male subsets large enough to be sure about potential differences?
I think it is a distinct questions how socially and culturally shaped gender stereotypes might affect these general questions systematically. But it seems to me that at least individual professionals as well as specific groups (e.g. MUS inventors) in the medical world are influenced by diverse biases including gender stereotypes ( e.g. male rationality vs. female irrationality) and that this can lead to bias in the research on and treatment of both women and men.