The rules differentiate between dealing and taking damage.
The Damage and Resistance section of the Basic Rules (emphasis mine) gives an example of such wording:
Resistance and then vulnerability are applied after all other modifiers to damage. For example, a creature has resistance to bludgeoning damage and is hit by an attack that deals 25 bludgeoning damage. The creature is also within a magical aura that reduces all damage by 5. The 25 damage is first reduced by 5 and then halved, so the creature takes 10 damage.
Example:
Emily casts fireball and rolls a total of 20 damage.
- A red dragonborn fails its DEX save. The fire damage is halved by the dragonborn's fire resistance, so the dragonborn takes 10 damage after reduction.
- A goblin succeed its DEX save. The fire damage is not reduced, so the goblin takes 10 damage without reduction.
The fireball deals 20 damage to the dragonborn, but only 10 damage to the goblin. The dragonborn and goblin take only 10 damage each.
The spell description says:
The guardian vanishes when it has dealt a total of 60 damage.
Failing the save means the guardian deals 20 damage, while succeeding means the guardian only deals 10 damage.
You factor in the outgoing damage towards 60, regardless of the damage the creature actually receives. The last creature failing the save on your example also takes 20 damage; after that, the guardian vanishes.
- First enemy fails. The guardian deals 20 damage. Has the guardian dealt 60 damage? No. Then do nothing.
- Second enemy fails. The guardian deals 20 damage. Has the guardian dealt 60 damage? No. Then do nothing.
- Third enemy saves. The guardian deals 10 damage. Has the guardian dealt 60 damage? No. Then do nothing.
- Fourth enemy fails. The guardian deals 20 damage. Has the guardian dealt 60 damage? Yes. Then guardian vanishes.
Total damage accumulated: 70 damage.