Been some remarkably extreme debates in recent years on such a simple question.
The UK Supreme Court today gave a unanimous ruling which seems entirely reasonable and will hopefully take some of the BS arguments off the agenda.
https://www.bbc.co.uk/news/articles/cvg7pqzk47zo
For me, a trans individual should be treated with respect and should not be treated badly or discriminated against based on being trans. Just as you should not discriminate based on sex, sexual orientation, race or any other protected characteristic.
However where it is proportionate to have a single-sex space, especially for women, then that should apply to women, where it is proportionate to do so. Especially if there are safeguarding concerns.
If someone who is biologically male but wants to identify as female then so long as it does not violate safeguarding, their wishes should be respected as much as is practical. Treat people with respect. However if it violates safeguarding, eg for sport, then a woman's-only space should where required apply to women and not those who identify as women.
Hopefully the heat can be taken out of the debate now and people can agree such a sensible position.

