It is complicated. What we know is that it is illegal to have a political party with out right racist views because the BNP lost its court case:
BNP 'whites-only' membership rules outlawed
https://www.theguardian.com/politics/2010/mar/12/bnp-racist-membership-rules-outlawed#:
Notice current far right wing political parties focus on immigration and religious beliefs not skin colour.
We also know that you can have a religious party advocating one religion such as the Christian party which can campaign on banning abortion and gay marriage and restoration of Christian values, so it is a party which gives primacy in men in certain ways:
https://ukchristianparty.org/what-we-believe/
However gender beliefs are unclear and messy. Gender ideology believes that gender, social ideas about being a man or a woman, or not being either i.e being nonbinary, is more important than sex, and human biology is not that significant. So the fact women are physically weaker than men doesn't actually matter that much and we shouldn't take it into account. It thinks that people who give primacy to biology are bigots and dangerous.
I think this is a metaphysical set of ideas which are basically religious. They are clearly sexist. The problem is we have people thinking this ideology is reality like the racist social beliefs of the BNP. I think it we have to live in a world with sexist parties, BUT if you want to be sexist then you can't pretend you are not. If you want to believe the sexes are unequal in some way you need the cover of a religion.
Religious members of a political party might have to compromise their beliefs to be members or choose other parties. However the choice is pretty clear for them. For gender critical people the situation is very unclear still. We are secular people who believe biological sex is more important than gender ideas. The courts have to weigh up if this idea shared by most people in the UK is in some way bigotry. How can it be when the existence of sex is a key part of the legal system and sex is a protected characteristic?
This is why this case and the case of Emma Bateman and Dawn Furness is so important.
Win or lose we will know far better where we stand after this. If we win the genderists will be in serious trouble. If we lose we have a way way bigger fight to come.