For a long time sex has been erased and replaced with gender identity. Trans-identified people actually lose out the most with this. There have been cases of trans-identified women having heart attacks, pregnancy emergencies, and kidney failure missed due to clinicians relying on normal male test ranges or presumed male sex. There have been issues for trans-identified men too but unsurprisingly it is the women who have suffered the most due to these policies.
Fortunately the NHS Core Information Standard has been updated to make 'sex at birth' a mandatory data item, with the option to record gender identity separately for patients who feel they have one.
(I don't personally believe in gender identity but recognise it is a genuinely held belief for many trans-identified people and also that it could be helpful information in the context of an altered body due to medicalisation.)