As far as i can tell that text is not considered canonical by Vibbhajavadin schools [schools of analysis] from which Theravada developed. I think it belongs to schools that were considered heretical by Theravada and would be among Mahayana texts. Early texts offer little commentary but there is some. There is a story in Theravadin Vinaya of a "pandaka" monk who first asked elder monks to attack him, then asked younger monks inb4 asking novices to attack him [a term used for sexual things, masturbation is called 'attacking with hand'] and being refused he wen't on to have sex with lay stable handlers and bad report spread about monks among lay people as a result. A rule was made prohibiting pandaka ordination but the definition of a pandaka isn't clear, is very vague and describes some behaviors that have to do with being gratified only by ingesting semen and or other particular deviances based on phases of the moon and whatnot. Same-sex sexual intercourse is not a cause for disrobing for a nun but is a disrobing offense for a monk. There are some differences here. There are also mentions of a monk's peculiar fascination with the Buddha, he had to be sent to away to train because he was so fond of seeing Buddha's form that it interferred with his training; but he was never referred to as to any terminology akin to gay, pandaka or anything close and whether it would be considered gay at this point is a moot point. He was one of the chief disciples, foremost in faith. It is important to note that in the beginning gay people were certainly allowed to become monks as there were little to no rules. It is also unclear whether they were allowed to ordain throughout Buddha's life but nobody was forced to disrobe because of new rules afaik. It is also clear that they were extremely tolerant in not beating up that monk who went around soliciting novices... Iirc when he asked monks told him 'go away pandaka, what good is that..' If anything i think pandaka is closer to sexually perverted *degenerate* or a maniac maybe more so than a particular orientation. It's my opinion tho. I think that if one puts it all together it paints a fairly tolerant culture.