This is great news. Reuters:

A U.S. appeals court in Manhattan on Monday ruled that a federal law banning sex bias in the workplace also prohibits discrimination against gay employees, becoming only the second court to do so. The 2nd U.S. Circuit Court of Appeals overruled prior decisions and said that a worker’s sex is necessarily a factor in discrimination based on sexual orientation. The ruling went against a court brief filed by the Trump administration in 2017 that said Title VII of the Civil Rights Act of 1964 was not intended to provide protections to gay workers.

The decision itself (pdf) noted that under the current unworkable arrangement, a woman employee could not be fired for appearing too "macho" but could be fired for being a lesbian. And a straight male employee could sue for hostile work environment if a manager tolerated anti-gay slurs used against him, but a publically gay employee could not:

"We now conclude that sexual orientation discrimination is rooted in gender stereotypes and is thus a subset of sex discrimination."

The Supreme Court refused to hear a similar case in December, so it is unclear and not guaranteed that they would hear this one.