The legal position isn't that sex is "assigned at birth" . It's that sex is a material fact that can be established. For the vast majority of people that will simply be their sex recorded at birth, but even if that isn't the case, and a person has a DSD, their sex can still be established, because sex is binary and immutable.
And since the law has long recognised there are situations where single sex spaces or services are required, for reasons of privacy, safety, dignity, or fairness, then sex in the Equality Act 2010 has to be understood as biological sex.
Otherwise the Act would be produce unworkable and perverse results.