The Sanctuary spell states:
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.
While the creature is charmed, you have a telepathic link with it as long as the two of you are on the same plane of existence. You can use this telepathic link to issue commands to the creature while you are conscious (no action required), which it does its best to obey. You can specify a simple and general course of action, such as "Attack that creature,"...
You can use your action to take total and precise control of the target. Until the end of your next turn, the creature takes only the actions you choose, and doesn't do anything that you don't allow it to do.
Meaning there are two ways this can go down: the caster uses their charm to have the dominated creature attack, or the caster can take complete control of the creature and have them attack.
If using the first option, telepathically communicating the instruction to attack against a Sanctuary warded creature, since the phrase is, "does its best to obey," it would stand to reason that the dominated creature would need to make the Wisdom saving throw. They still have some control, and are trying their best.
But the second option, complete control, leaves some wiggle room. Who, if anyone, makes the Wisdom saving throw to attack?
- The spellcaster, as they are the one with the control and declaring the target.
- The dominated creature, because they are performing the attack.
- No one. The dominated creature has no choice but to obey, and the spellcaster is not directly targeting the warded creature. They are merely controlling a creature.
- Some other answer.