> If the courts found that the transphobic and racist behaviour in the police station met the threshold for causing harassment, alarm or distress then it was a crime, and given the abuse was based on someone's race in one instance and someone's transgender status in the other then they are racist and transphobic hate crimes.
For someone who writes so much about the law you don't seem to know very much about it.
Increase in sentences for aggravation related to disability[F1, sexual orientation or transgender identity]
(1)This section applies where the court is considering the seriousness of an offence committed in any of the circumstances mentioned in subsection (2).
(2)Those circumstances are—
(a)that, at the time of committing the offence, or immediately before or after doing so, the offender demonstrated towards the victim of the offence hostility based on—
(i)the sexual orientation (or presumed sexual orientation) of the victim, F2...
(ii)a disability (or presumed disability) of the victim, or
[F3(iii)the victim being (or being presumed to be) transgender, or]
(b)that the offence is motivated (wholly or partly)—
(i)by hostility towards persons who are of a particular sexual orientation, F4...
(ii)by hostility towards persons who have a disability or a particular disability[F5, or
(iii)by hostility towards persons who are transgender.]
6)In this section references to being transgender include references to being transsexual, or undergoing, proposing to undergo or having undergone a process or part of a process of gender reassignment.]
It is not necessary for the homophobic/transphobic words used against a police officer arresting someone for an unrelated matter to be backed by the police officer actually being gay/transgender, it is sufficient for them to be 'perceived' as such.
Since there is no objective definition or way of telling if someone is transgender, it follows that such abuse is ipso facto a transphobic hate crime, even though the original offence was a drug addict smashing up his family member's house, which is nothing to do with transphobia.