not only islam, other cultures that had some level of comprehension of queerness got leveled and today are very homophobic places, like india, the exception being the philipines i think.
the inca empire had a bissexual god, other native people in the south america had what they called two spirits, can’t pinpoint exactly if that was intersex or nb, chinese religion had a gay god, india had a third sex.
wherever the colonizer set foot, they sure taught the locals to abhor queerness to the bone, for example in brasil, i don’t remember if it was the french or the portuguese considered the two spirits a aberration and sentenced those people to execution my canon.