Oof the Dubai comment is super ill-informed
I live here and while it is illegal by the books, because of religion, no one is outright going to ask you if you're homosexual and throw you out of the country.
I'm not trying to sound government sponsored, but I do believe that UAE is extremely tolerant compared to other Arab countries. This most likely comes from the large tourism industry that fuels the country. They've lifted a lot of laws in recent years like alcohol laws have been removed and they sell pork in separate sections of major supermarkets.
I mean the country has a national religion and a lot of laws are based on it. But no way they will penalize someone for their beliefs unless it has to do with documentation. I don't support this notion, but I don't have a say in their religion and I'm sure someday these laws will be relaxed because we're slowly moving away from suppressing people's individual choices.