Why do you think those two things are mutually exclusive? What if women are choosing to leave computer science because it's somewhere between subtly discriminatory and outright hostile?
I'm sure it's cultural because: in the US women in CS was ~37%, today it's 18%. Why the huge swing? There have been times in recent history when many many more women chose computer science. In India, there have been years when the participation rate was above 50%. There are places on earth today where many many more women chose STEM.
So, it's obvious based on the data we already have that today's low participation rates by women in the US and Europe is not an intrinsic property of women, rates are neither fixed nor the natural state of things.
All the rest of what you said is that maybe it's attitudes, and sure, maybe it is. Maybe that's the problem?
I've spoken with women too, and anecdotally, most women say the exact same thing as most men when they say computer programming sounds super boring. Some women I know confirm that discrimination and hostile behavior exists and is alive and well, especially the higher you go in an organization.