But D&D is a group game. Making yourself difficult to target is indeed essentially useless if the monsters just go on hitting on your team ally, just as the OP has discovered.
With the same information I get the opposite result. The way I look at it: D&D is a team game. Sanctuary is a great spell to make sure the
right teammates get attacked.
* If there are two likely targets, it can make monsters go after the one with better defenses, be it AC, Resistance, etc.
* If one teammate is damaged badly, it can encourage damage to other teammates so there isn't a potental loss of action by having them drop.
* If one teammate is
undamaged, it's use on others can encourage monsters to attack that one. Enough damage to kill one PC will not impair fighting ability at all when spread across two PCs.
* Because of the large amount of self healing out of combat, it's conserves spell/potion and other in-combat healing if damage is spread across several PCs, and which Sanctuary can encourage.
For these, even a single round before they go again can cause foes to change targets, and would need to suck OAs to change back. As a bonus action low level spell, it can often be cast with little cost.
It also has some straightforward uses.
* If you only have one character standing up fallen PCs you can make sure they don't drop.
* Foes without casters may not recognize the spell and need to waste an attack to understand what is going on.
But really, if you were solo it is partial action denial on yourself, so it's only because D&D is a team game that it has so many excellent uses.