The Prophet ﷺ said: When sin is done in the earth, he who sees it and disapproves of it will be taken like one who was not present, but he who is not present and approves of it will be like him who sees. (Using translation from Abū Dāʾūd 4345)
"إذا عُمِلَتْ الخطِيئةُ في الأرضِ كانَ مَنْ شَهِدها فكَرِهها كمنْ غابَ عنْها، ومَنْ غابَ عنْها فرَضِيَها كانَ كمَنْ شَهدِها" .