All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
First of all, it is not permissible for a Muslim to voluntarily go to a place where evil is taking place; meaning without necessity or a dire need because the dire need may render what is forbidden permissible as determined by the scholars.
The criterion for this dire need is when a person finds himself in a state of difficulty and hardship if he does not do what is forbidden. In this case, it becomes lawful for him to do what is forbidden as away of repelling this hardship.
This hardship increases at the time of corruption and when people are far from the religion of Allah, and one can hardly find a place where there is no evil, as we can see during our present age. When this becomes the case, then scholars make matters easier for people and do not restrain them, while ordereding them to obey Allah and fear Him as much as they can and stay away from places of evil.
Some scholars differentiated between the ruling of hearing unintentionally and listening intentionally. Ibn Hajar Al-Haytami said in Az-Zawaajir ‘an Iqtiraaf Al-Kabaa’ir:
“What is forbidden is listening and not hearing unintentionally; this is according to the agreement of all the scholars. It is for this reason that the scholars of our School of jurisprudence [i.e. the Shaafi’i School] explicitly stated that if one lives in a place where he hears forbidden musical instruments and he is unable to remove them, then he is not obliged to move away (i.e. change his dwelling), and he is not sinful by (unintentionally) hearing them without the intention of listening to them.” [End of quote]
Nonetheless, whenever a Muslim is able to avoid places of evil, then, in principle, he must do so. If it is decreed that he goes there, then he should enjoin what is good and forbid what is evil as much as he can. He must do so in a gentle and wise manner. Abu Sa’eed Al-Khudri narrated that the Prophet said: “Whoever amongst you sees an evil, he should change it with his hand (i.e. physically), if he is unable, then he should change it with his tongue (i.e. verbally) and if he is unable, then he should change it with his heart (by detesting it) and that is the weakest level of faith.” [Muslim].
For more benefit, please refer to Fataawa 83528, 91852, and 217525.
Allah knows best.