TartrazineCustard
I don't think there's any reason to assume that reading. FPFW and other groups had been engaging ONS on this for a couple of years. The census team would have known this was a contentious interpretation of the question, particularly in the context of public debate on sex and gender. I would have expected them to ask for legal advice from their in-house team or from Government Legal. Departments do this all the time.
Guidance like this doesn't get finalised by a random team working in a silo. The final version, given the profile of the census, would have been signed off at high level, accompanied by a submission with advice detailing any potential legal or other issues/risks. That is just routine for advice in govt departments.