If a unit has an active "Set Target" command, issuing an Attack command should override it (either override it for the duration of the attack, or remove Set Target completely). Whether the units should shoot at "Set Target" target at all, or only while "Attack" target isn't in range, is another topic.
Awkward moments when you realize your attack did nothing because your units targeted something completely different.