I doubt it's illegal.
You probably mean it's incorrect.
Calling people names isn't against the law, it's just rude and/or ignorant.
The Sex Discrimination (Gender Reassignment) Regulations in 1999 formally transposed this ruling into UK domestic law. It is now illegal to discriminate against someone who ‘intends to undergo, is undergoing or has undergone gender reassignment’. The comparator is the trans person themselves as if they were not transsexual.
The Gender Recognition Act 2004, strengthened Sex Discrimination protection for those transsexual people who have obtained legal recognition through the granting of a Gender Recognition Certificate by disapplying the aforementioned Workplace Genuine Occupational Qualifications in those circumstances.
that was copyd and pasted