to a degree possibly but the extreme skew in engineering disciplines makes that hard to believe. In almost all other fields with a gender bias that could be put down to preference there's usually still a sizeable amount of the opposite sex. In psychology where women outnumber men it's like 30-70, even women in the national guard on active duty are more common than in CS departments. Even other adjacent STEM fields like maths usually look more diverse than CS.
And in the workplace compared to academia it arguably gets worse. Just from personal experience in software development jobs, I put a lot of it on culture. Just look at how 'boys summer camp' like startups are run, with frequent stories of drinking at the workplace and stories that sound more like out of a fraternity than an actual job. Emily Chang wrote a good book about, 'Brotopia'
https://www.vanityfair.com/news/2018/01/brotopia-silicon-val...