You ward a creature within range against attack. Until the spell ends, any creature who targets the warded creature with an attack or a harmful spell must first make a Wisdom saving throw. On a failed save, the creature must choose a new target or lose the attack or spell. This spell doesn’t protect the warded creature from area effects.

If the targeted creature makes any Hostile Actions, sanctuary ends

Critical Success Sanctuary ends.
Success The creature can attempt its attack and any other attacks against the target this turn.
Failure The creature can’t attack the target and wastes the action. It can’t attempt further attacks against the target this turn.
Critical Failure The creature wastes the action and can’t attempt to attack the target for the rest of sanctuary’s duration.