All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
A person is required to fear Allaah according to his ability, and he should advise people for the sake of Allaah, and should enjoin good and forbid evil. He should try to change the evil according to his ability. If a person is steadfast on this and was not negligent, then Allaah would not hold him responsible for things which are beyond his ability.
Therefore, if there is a way to object and refute this law and endeavour to annul it without exposing yourselves to any harm, then do so.
Indeed, no revealed legislation, nor sound mind or Fitrah (natural disposition upon which Allaah created mankind) would accept or endorse homosexuality. For more benefit, please refer to Fataawa 90305 and 88137.
As regards residing in such a country, it is permissible, Allaah willing, as long as a Muslim is capable of establishing the rites of his religion, and provided that he and the people under his responsibility, like his wife and children, are safe from being afflicted by the temptations which are spread there. It is known that this is something difficult to achieve, however, even if we presume that this could be achieved and migrating to a Muslim country where one could be safe is possible, then migrating is more appropriate.
For more benefit, please refer to Fatwa 86405 on the ruling of residing in non-Muslim countries.