The Prophet (ﷺ) said:
“The believers (in their mutual support) are like a structure, parts of which support other parts.” And he interlaced his fingers.
Support your believing friends, even if you see them doing wrong. Don’t shy away from telling them about it and giving them some advice or a reminder. If they still don’t change, support them by leaving them alone.