The following situation came up recently in my D&D 5th Edition game: My PC (a Cleric) was initially restrained by a summoned Spider's web attack and was being dragged away. Upon freeing himself, my PC immediately cast Sanctuary on himself.
A round or two later, the spider managed to roll a successful Wisdom save to attack and restrain the PC again. The DM ruled that this 'broke' my Sanctuary.
At the time I didn't think anything of it (and combat ended next turn anyway so the point was fairly moot in this instance), but having reread the description for Sanctuary I'm not entirely sure this is what should have happened. Sanctuary states that a creature can make an attack if they pass their Wisdom save, but doesn't mention that the Sanctuary falls upon a successful attack:
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.
Should the Sanctuary have ended in this instance, as the DM ruled?