Not sure I agree with that. From what I understand about amnesia, it tends to be declarative memory that gets lost rather than procedural - so crudely speaking you forget "facts" and retain "skills". That might suggest that although you can't recall the names of your previous partners, or the names of the body parts you most enjoyed interfering with, , you might well still find all the habits and moves and desires remained.
It depends on the type of amnesia the person possesses. There's anterograde amnesia, which is the inability to form long-term memories. People typically forget facts or information minutes or even seconds after they have learned them.
Or there's retrograde amnesia which is the loss of previously held memories. Typically this targets the patients most recent memories and works backwards with the length of time depending on the severity of the trauma that caused it.
As recollection it depends on the parts affected. There are different separate functions of memory which are located in different areas. What the person forgets depends on where the trauma is. If their amnesia is limited only to their declarative memory then they would forget personal facts and information, but the rest of their memory would not be affected.So such a person would forget the fact
that they were gay (at least until they figured it out again). But none of the learned behaviours and mannerisms they had picked up and developed over the years. In other words (assuming being gay is a choice and not genetic) they would still retain an attraction to men because it is a learned behaviour, however they would not factually remember actually being gay or why they are attracted to men. Although I imagine they would figure it out pretty soon.
What could happen is that if a person suffered from a form of dissociative amnesia then they could forget they were gay. Dissociative amnesia is usually brought on by mental trauma where certain memories are repressed or altered. In this case some severe mental trauma (such as long term abuse from a parent for being gay) has caused the person to literally force himself to believe he is and act straight as a defense mechanism. He would likely still technically be attracted to men but he would rationalize the feelings in some other way and find a different means of expressing the urges.