So the problem is.. Which way is it suppose to be?
Exactly. I'd say target what the player clicks. If they target an enemy unit, chase it down. If they click ground, attack ground. I don't think it has a big enough AoE that they intend target ground to be present, though.