The difference between race and orientation or gender identity is that you can't always, or even generally, tell a person's orientation by looking at them and even gender identity can be tricky. Sometimes trans and enby people do dress or act in obvious ways, but many can "pass" (like a trans person who has nothing to differentiate them from a cis person of the same gender) and aren't recognizable on sight.
Whereas race is generally something visible because it based on visible characteristics (e.g. skin colour), even if our concept of race is lacking in nuance and shaped by colonial ideology. Thus it is far harder to hide than orientation or gender identity.