The only times I wouldn’t advise leaving a friendship like that would be if it’s an instance of abuse, because it’s really difficult to leave things like that and realistically they will go back to the abuser a few times at least and they just need consistent support to leave for good. Revictimization rates are really high for abuses like sexual assaults and interpersonal relationship violence.