Only if you actually did right-click on a target. But if a mob aggroes you as you run past, they're automatically set as your target with no action on your part. It's a handy feature if you're going to fight them, since you don't have to waste time cycling through targets trying to reach the one that's already attacking you. But it can be annoying if you're not interested in fighting them at all (especially if you're trying to target something else and the game keeps changing it on you).