It's always interesting to see though how many people really have trouble navigating this difference between being as open as anyone about things like family life, while not taking it into the territory of sexual preferences as such.
I have a gay male friend who I find navigates this in a way I think is increasingly unusual now. He really just does not talk about his private life in a work context, at all. He's not married or attached, so it doesn't come up through talking about his weekend or his partner being sick or anything like that. There are people at work who know he is gay, but they are pretty much people he has developed friendships with outside of work and who he sees socially.
He's quite a private person though, and works with people from quite a wide variety of backgrounds in a service role, so there is a kind of desire to maintain a professional distance. And not all jobs are like that and some people are more inclined to be open.
I also know another gay man who is less private in his day job in an office position, on the other hand he also teaches music lessons to kids and maintains complete privacy in that context, including when he was married.
Obviously not all workplaces have identical considerations but I do think it's worth thinking about where we would best draw lines around private information about our lives. Like, maybe our dating life isn't something most people would discuss at work?