Here’s the short answer: No.
As for the long answer, many people with obsessions about their identity are afraid that, deep down, their obsessions make them a bad ally. They think that because they don't want to be gay, they must hate gay people. And if they don't want to be trans, they must hate trans people. This is not true. Having an obsession about being gay, bi, lesbian, trans, or any other identity, is not indicative of being homophobic, biphobic, transphobic, or a bad ally. Obsessions are typically experienced as ego-dystonic, meaning that obsessions are not in line with who the person experiencing them believes themselves to be. This is why obsessions, especially obsessions about identity, are so distressing. They feel alarming. They feel wrong, because the person experiencing these obsessions really aren't the identity that they're afraid they are. People with obsessional doubts about being gay aren't gay - people with obsessional doubts about being trans aren't trans, but that doesn't mean that someone with sexual orientation (SO) or gender identity (GI) obsessions are bad allies for not wanting to be gay, or straight, or cis, trans.
Let's take a look at why. Consider the case of Kamal.
Kamal is a 32-year-old male, who, up until he was 28, considered himself to be a heterosexual, cisgendered man. Kamal also considers himself to be a good ally and has many friends of varying sexual and gender identities. Over the last few years, he has experienced distressing doubts that he might not be straight. This brings him tremendous stress because Kamal is also in a committed relationship with a woman. He once heard that there are some people who did not realize their sexuality until they were already in their 20’s, 30’s, or even later. He starts to wonder if maybe he is one of those people. Though he has always been interested in women, it is certainly possible. Kamal and his girlfriend just committed to a 1-year lease, so he has found himself under an increasing pressure to figure this out. If he really is gay, he feels he needs to know as soon as possible. He wouldn’t even care if he was gay; his family and friends would be very supportive. This makes him wonder, “If I really support people in the LGBTQ+ community, then why am I upset about the idea of being gay?” However, he would have to break up with his girlfriend, and he doesn’t want to hurt her. He loves her very much and can’t imagine his life without her, but he’s really stuck on these thoughts. Kamal fears himself to be a clueless person, though he is educated, intelligent, and competent. He is worried that there could be something about himself that eludes him. Because he thinks he could be clueless, his obsessions revolve around missing critical information about his identity, his health, and his job.
Let’s take a look at a potential obsessional doubting sequence for Kamal.
Trigger: I’m watching tv and see a commercial depicting two men in a relationship
Obsessional Doubt: What if I’m gay, and it’s just taken me this long to realize it?
Consequence of Doubt: if that’s true, I’d be living a lie. I’d have to break up with my girlfriend.
Anxiety: I don’t want to live a lie, or break up with my girlfriend.
Compulsion: I change the channel when this commercial comes on, so I don’t have to be bothered by these thoughts.
Does this make Kamal homophobic? While the obsessional doubt does revolve around the possibility of being gay, that's only part of the sequence. The reason why Kamal would care about being gay isn’t that he is homophobic. It’s that he wants to live a genuine life and doesn’t want to lose his girlfriend. Kamal is not actually concerned about being gay, he is ultimately more worried that he could be missing a piece of information that he should know. He is susceptible to developing multiple obsessions about his identity, his health, his relationship, his job, and anywhere else that he could be a clueless person. These fears are not homophobic. Let’s look at another one.
Jeanette is a 19-year-old cisgendered woman. A few months ago, she learned the term “egg”, when a friend jokingly called her one after she showed up to lunch in her boyfriend’s jeans and a slouchy shirt. An “egg” is slang for a trans person who doesn’t know that they are trans yet. Jeanette went home, started looking up the term, and learned that there are people out there who are transgender but don’t know it. She starts to wonder if maybe she is one of those people. She never considered the possibility before, but it is within the realm of possibility - after all, it has happened to other people, so it could happen to her too. Jeanette still lives at home while she commutes to college and knows her parents would not accept her if she truly were trans. She’d be kicked out of the house, disowned, and her life would become much harder. Jeanette is afraid that she could be someone who is dishonest and has other obsessions about being perfectly honest with those around her.
Again, let's deconstruct this obsessional sequence:
Trigger: I go to the grocery store, and I see someone with a pronoun pin and a trans pride flag.
Obsessional Doubt: I could be trans.
Consequence of the Doubt: and if that’s true, I would be disowned by my conservative family, I’d get kicked out of the house.
Anxiety: I don’t want my life to be harder, I want to be perfectly honest with myself and those around me.
Compulsion: I check and see if I’m experiencing gender dysphoria. I look at Reddit posts, and watch videos by trans people and try to compare my experience with theirs, to see if I really am trans.
Notice again that Jeanette is afraid of being trans, not because she dislikes trans people, but because she’s afraid of being disowned by her family, and she doesn’t want to be dishonest with herself or the people around her. These aren’t the thoughts of someone who is transphobic, these are the fears of someone who is ultimately afraid of becoming her feared possible self, someone who is dishonest.
One last point to make is this: from the perspective of I-CBT, everyone with OCD has what is known as a feared possible self. This is the algorithm of the OCD, in that it determines which obsessions someone is susceptible to. For example, someone who is afraid of being a clueless person may develop sexual orientation obsessions because they are afraid that there could be a critical facet of their personality that they are unaware of. Similarly, someone afraid of being a dishonest person may develop sexual orientation or gender identity obsessions not because they are a bad ally, but because they are worried that they could be someone who is not perfectly truthful with others or themselves.
At the end of the day, people with sexual orientation or gender identity OCD should not concern themselves with their obsessions meaning that they are phobic or a bad ally because their concerns are largely not actually about being trans, or gay, but actually about the possibility of being someone other than who they thought they were. The consequences of being someone other than who they have believed themselves to be throughout their life can be frightening as well. We know that people in the LGBTQ+ community are regularly victims of discrimination, harassment, family abandonment, loss of housing and employment, and violence. It's hard to imagine anyone would want these stressors in their life. Again, for most people it's not about the identity itself, but about the consequences that could happen if they realized that they weren't who they thought they were.