When I studied comp sci around 2000, women were actively discouraged from continuing their classes by professors. During an oral exam, a prof told a female friend of mine that women had no place in comp sci. As a result, not many women graduated, so two decades ago, there were just fewer women in the field in general.
I'm not sure what exactly qualifies as a "legacy game engine", but given the small number of women who worked in comp sci when games were made ten or twenty years ago, and particularly in male-dominated videogame studios, I would naturally not expect to see a lot of cis women with experience working on these engines (or on related tech stacks) today.
This seems like a bit of a special case, rather than a general representation of women in software engineering.
That was 20 years ago, things changed.
Most modern game engines are less than 10 yrs old.
Your assumptions are wrong and out of date.
Lately my bread and butter is fixing legacy game engines. I have yet to meet a ciswoman tech lead who can do this work.