Female-only spaces have practical reasons behind them, such as safety, freedom from harassment, privacy and specific biological needs. In these real world scenarios, there is no parallel to racial discrimination.
I mean just look at this court case. A man tried to access a female-only social app, was ejected, and is now using Australia's court system to harass the woman who said no. This pattern of harassing behaviour from a subset of males illustrates one significant reason why female-only spaces are needed, to help provide respite from this.