Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
How do we help people who are in open disobedience to Allah?
We do not condone their disobedience and we must not be present while they are in disobedience to Allah. Instead we should try to find a time when they are ready to listen to us. We can then either give them sincere advice (nasihah) directly or use some indirect means such as inviting them to a gathering or giving them a book or a recording of a talk.
We also need to give them permissible alternatives to the forbidden things which they are doing and we should facilitate this for them. We should move them to an environment in which their hearts can be attached to the remembrance of Allah and His Messenger ﷺ for a few days before they come back to their original environment. We should pray for them abundantly.