For some reason SE is against supporting macro users because this problem has persisted since the launch of 2.0 and also why we still don't have add-on support for the game officially.

/micon "Cure"
/ac "Cure" <mo>
/ac "Cure" <t>
/ac "Cure" <f>

Is what my macro for my heals all look like to help lower the chances of my cast healing me instead. I still end up getting heals on myself even though I'll have mouseover on the tank, have the tank focus targeted, or also my current target.