Title VII prohibits employment discrimination against someone “because of” their “sex.” Supreme Court precedent holds that this phrase includes discriminating against someone for not conforming to sex stereotypes. For example, in Price Waterhouse v. Hopkins the Court held that it was Title VII discrimination to fire a woman because she had masculine behaviors. She wasn’t fired because she was a woman, but because she was a woman who did not conform to stereotypes and norms applicable to women.
In view of that precedent, Title VII can be seen to prohibit sexual orientation and sex discrimination. You can’t fire a man for failing to conform to the male norm of dating women. You likewise can’t fire someone whose sex is male, but whose gender identity is female (i.e. she does not conform to the gender expression expected of biological men).