I have observed that when you are slowly approaching a mob, trying to find the farthest spot from it where you can first cast on it, you enter a small ranged area where you can start casting, but where, when the spell finishes, you get a message that your (non-moving) target is out of range...