I don't think this issue happened in that simple a way.
This ideology, and the capture of the civil service, went on in a very underhanded way. Very few people have understood the implications until the last few years, and its likely that any party that had been in power would have embraced a similar approach. Although if you look at the transcripts of discussions in the HoL about things like the GRA, it is mostly Tories who seemed to see the potential problems.
This targeting of the civil service and quasi-governmental groups was very deliberate, and deliberately quietly done.
The tendency to look to special interest/lobby groups for policy directive in special areas of interest, and especially representing identity groups, has been going on for a while. The left really embraced this as they were seen, unlike political people, as having expertise, lived experience, even a kind of political impartiality. As for Stonewall in particular - people seem to forget sometimes just how well regarded they were as an organization. They could do no wrong, were seen as the gold standard for education, and the fact that they endorsed gender ideology is one of the main reasons it was so readily accepted.
The problem now is how to root it out. The Tories are struggling., but trying. Will Labour even try? My gut feeling is they will not take things further but won't address any of teh institutional capture.