This is such an interesting topic!
Sexuality was viewed very differently in the 19th centrury, and there were huge variations across the European nations and cultures.
Rich titled people rubbed shouloders (mongst other things!!) with the great and good from the arts, where, many, as today, were gay. In those days these "differences" were understood, perhaps acknowledged but rarely talked about.
In Russia, where men were thrown together in vast military organisations, it was not that unusually for the boys to form romatic attachments (whether they led to anything physical or not). It was not that ususual for a certain amount of physical affection to be shown between men in russia, whereas in England this would have seemed odd.
I also believe that there is a percentage of straight men who, in the right (or wong - depending on how you look at it), can be influenced to taste the forbidden fruits of homosexual dilly dallying and emegrge non the worst for it. All part of a young man's progress. After a bit of naughiness with a handsome guards officer they marry, have kids and move on.
More up to date, we have another decendant of Grand Duke Vladimir, HRH the (late) Duke of Kent, who was killed during WW2, who was allegedly gay, and had a fling with Noel Coward. there are rumours to this day that he was bumped off because of his indiscretions. That did not stop him having three children, HR the Princess Alexandra, HRH The Prince Edward, the present Duke of Kent, and HRH The Prince Michael of Kent. These are all grandchildren of the Grand Duchess helen Vladimirovna and Prince Nicholas of Greece (their mother being Princess Marina of Greece & Denmark).
Prior to that we have HRH Prince Albert Victor ("Eddie" ) Duke of Clarence & Avondale, eldest son of Edward VII, who is rumoured to have had interludes in London's Gay bordellos (well, haven't we all). Rumour surrounds his sudden demise too, a he would have inherited the throne had he not popped off!!
I am sure there are many more.