If it said that the target had to dash at every opportunity or could only take the dash action and must move away as fast as it safely could, you'd be right. But not what it says.

It says the target must take the dash action on its turn. As long as the target does so, the target can do anything else with any remaining available actions it wants. It says the tart must move away from the caster. As long as the target moves away from the caster on the target's turn, it has satisfied the requirement. Is one foot further from the caster a move away? Yes, it is. The target has moved away from the caster, satisfying the requirement.

The clause about nowhere to move lets the target not even have to move that little if it cannot do so safely. that's all.

Now, the implication is that the target is fleeing in not-quite-blind terror, and that is what these requirements are trying to simulate. They are simulating it badly if taken as "sufficient." I do recommend ruling that creatures must spend every available action dashing or otherwise trying to move as far from the caster as they safely can.

But it is bad logic to take what the spell should be accomplishing and trying to convince ourselves that the text actually says that. It doesn't.

To add to the discussion: on the one hand, I would be tempted to permit the use of Misty Step, Dimension Door, or Teleport to move away from the caster even faster. On the other, I can see an argument that yo too scared to cast a spell. As written, if you take the dash action and still have either an action or a bonus action available to cast one of those spells or use a similar ability, you can do so. I don't think that is out of line with the spell's intent, unlike the cheesy, athematic possibilities (such as stopping after moving away only one foot).