Muslims should know that those Muslims who commit grave sins are still believers as long as they did not commit an act that amounts to disbelief in Almighty Allah who says in the Qur’an: [Surely Allah does not forgive that anything should be associated with Him, and He forgives what is besides this to whom He pleases…](An-Nisaa’4: 116).
Therefore, we have to deal and relate with them as Muslims and never lose hope in reforming them, since the door of repentance is wide open and Almighty Allah may guide them to the straight path.
We do not have the right to mistreat or dishonor them; however, our duties towards them are to give advice, guide, and remind them of Allah’s punishment and that death comes suddenly and that this life is short. If they respond to our advice, we have to thank Almighty Allah, but if they insist on wrongdoing, we should realize that we are only advisors, not judges. Almighty Allah says in the Qur’an: [The duty of the messenger is only to convey (the message). Allah knows what you proclaim and what you hide.](Al-Ma’idah5: 99) And, He also tells the Prophet Muhammad (peace and blessings be upon him) [Therefore do remind, for you are only a reminder. You are not a watcher over them.] (Al-Ghashiyah88: 21-22)
In his explanation on this issue, Dr. SalahSultan, states:
A Muslim is supposed to follow the example of the man mentioned in Surat Al-Kahf. When this man saw that his friend had disbelieved, he started questioning him gently: [His companion said to him, in the course of the argument with him: “Do you deny Him Who created you out of the dust, then out of a sperm-drop, then fashioned you into a man?” But (I think) for my part that He is Allah, my Lord, and none shall I associate with my Lord.](Al-Kahf 18:37-38)
So, he argued with his friend gently and started inviting him to give up disbelieving in Almighty Allah. We should take the same approach with the people mentioned in the question.