In this article from the Times, the authors discusses the proposal to remove gender categories from the ONS census. Marmot and others respond with concerns about the effect this may have on monitoring for inequalities in health.
Later ONS issued a clarification to indicate that they will continue to collect sex on the census return. The consulation is on adding an additional question on gender, which allows people to record a status other than that assigned at birth (or subsequently changed through a complex medico-legal process).
It is sex and not gender that is recorded at death (since no informant can reliably record the views of the deceased), so there is no threat to the life expectancy figures referred to.