Sanjak in Terry and the Pirates
While the character didn't explicitly come out of the closet, cartoonist Milton Caniff alluded to the homosexual orientation of French naval officer Sanjak in the 1938 to 1939 edition of his comic Terry and the Pirates. The villainous woman disguises herself as a man and calls herself Madame Sud, then essentially hits on the protagonist's girlfriend, April Kane.
Milton said in those days you couldn't have an outed homosexual character in a comic, but he hinted at Sanjak being gay. He even named her after a Greek island next to the island of Lesbos, from which the word "lesbian" is derived.