lets suppose and spellcaster start casting a 1 round spell of close range. The target of the spell see that and run away getting out of the spell range.
Do you happen to have a specific spell as an example?
Generally I would say the spell fizzles if there's no longer a legal target, but it'd help if you had something more specific.
Yeah, I would say if you started casting Dominate Person and the target recognized the spell and decided the smart move was to run out of range, you'd lose the spell since it would fizzle out with no legal target.
Keep in mind that you don't pick the target until the spell is done being cast. If the troll you were going to dominate scampers off or gets killed, you can still target that ogre that happens to be in range...