The gay thing became an issue during the Red Scare of the 40's and 50's because homosexuals were perceived as vulnerable to blackmail. One of the great proponents of Gay Baiting was the deeply closetted but totally gay Roy Cohn, Sen. Joseph McCarthy's right hand man.
Hardie Amies, who designed fashions from 1933 on and became Queen Elizabeth II's favourite designer was in the British Special Operations Executive managing contact with the Belgian Resistance. One of my favourite stories from one of the Saturday supplements while we were in England was one of Amies associates who was an officer in the Western Desert who wore a pink chiffon scarf with his uniform, and directed his troops using a rolled up copy of Vogue. The British Army has always recognized the issue, but never treated it as a problem, probably due to their wartime experiences where gay soldiers proved themselves incredibly courageous, and good leaders.
Squadron Leader Ian "Widge" Gleed fought through the Battle of Britain, and later the Western Desert and was as gay as they come, but was recognized as a superb leader and a very aggressive fighter pilot. He was killed over the Western Desert. [For those unfamiliar with British Desert Operations, the Western Desert stretched from Egypt through Libya to Tunisia. The two necessary books are Fizroy MacLean's the Eastern Approaches, and The Phantom Major about Major, and later Colonel, David Stirling who invented the SAS. It was written by Virginia Cowles.] Also anything about the Long Range Desert Group in WW2.
Frederick Lindemann, Churchill's science advisor, had a brother who worked in intelligence in WW2. He lived before and after the war in Paris, with his two Rolls Royces, a black one driven by an albino in a black uniform and a white one driven by a black man in a white uniform. What do you think the odds are that he was gay? Anything under 100% is wrong.
Additional References, MI6 by Nigel West, and Most Secret War by Professor R.V. Jones perhaps the most significant scientist working in a counter intelligence role.