What you're describing is transphobic. It's a completely different kind of thing. This isn't discrimination.
This statement is factually correct, does not infringe on anybody’s rights, and you’d have to be naive if it was not done with some kind of purpose.
To be clear, I am not accusing Elon of being transphobic or promoting an anti-vax agenda. I am highlighting how “it’s factually true” does not mean it is appropriate.