The comment you're answering to is talking about harassment and gatekeeping.
Hiring is one gate, but if you're hired just to reach gender goals or to satisfy the lust of your new manager, you will not have the same experience at the company than someone from the other gender. Like getting raises or being promoted.
Things are complicated.
Other factors like harassment are important, but again the evidence doesn't seem to suggest it's responsible for gender imbalances. Engineering has one of the lower rates of harassment among professional industries (32%) less than plenty of industries with more balanced gender representation like healthcare (35%) and media (41%) [1]. And this is just among white-collar industries, service industries and blue collar industries are by far even worse [2].
1. https://variety.com/2018/biz/news/media-industry-sexual-hara...
2. https://www.vox.com/identities/2017/11/21/16685942/sexual-ha...
The assumption that an industry that has a large gender imbalance will inevitably end up discriminating against the minority gender is incorrect. Plenty of studies have shown tech companies to actually favor women in hiring:
Tech companies were more likely to give callbacks to female applicants: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3672484
Modulating people to sound like the opposite gender in coding interviews actually hurts women and helps men: https://blog.interviewing.io/we-built-voice-modulation-to-ma...
There are policies that can eliminate bias: Strip names and identifying information out of resumes before recruiters see them. Modulate voices in interviews to eliminate ability to infer gender or foreign accents, and use no video so as to prevent people from identifying races. The problem is that this often doesn't produce the results people are expecting.