It does in that gender identity and sexual orientation are inherently linked to sex--for example, a law, say, barring transgender women from employment is placing only people whose sex was determined as male at birth (interestingly, there are actually a decent amount of people who are intersex/have disorders of sexual development where their condition isn't diagnosed until later in life) at risk for discrimination for engaging in "female" gender expressions, whereas the same gender expression would be a-okay in someone whose sex at birth was determined to be female. Similarly, an employer firing a female employee for dating another women is discriminating on the basis of sex because they wouldn't fire a man for dating a woman. By narrowly defining "sex" as biological sex assigned at birth, the courts made the law expansive enough to cover gender identity and sexual orientation.
Again, I think a lot of these anti-trans issues are based in the "guy in a dress"/"girl who dresses like a guy" stereotype, where the issue people have isn't so much trans people as it trans people who don't pass or cis people who gender nonconfirming. No one would look askance at Hunter Schaffer (a trans woman) entering a women's bathroom, for example, or Laith Ashley (a trans man) entering a men's locker room and if they were to enter spaces designated for their sex assigned at birth, the same people pushing for these anti-trans bills that would require them to do so would probably scream that they were entering the "wrong" rooms. What you overwhelmingly get with these bills is cisgender gender non-confirming people (a lot of butch women) and trans people who are early in their transition or who are otherwise clocked being attacked, because they don't fit into rigid sex stereotypes more than anything.
Sports are a bit hairier, because there are physical advantages to be pumped full of testosterone during male puberty, but the extent to which those advantages fade (or don't) with long-term T suppression and estrogen replacement is more of an open question for science, and it's also further complicated by the fact that elite athletes tend to have some biological traits on the far end of the curve regardless of if they are trans or not. Personally, I thought the NCAA's previous stance on athletes competing under their natal sex until they started HRT made sense--then it was a personal, informed choice for each athlete if they were willing and able to delay HRT to compete for longer or not.