And that's why ultimately you need a ruling from the GM.
Exactly. There are so manny edge cases and combinations that you have only three possibilities, all outlined in a few sentences in the SAC: "
The DM is key. Many unexpected things can happen in a D&D campaign, and no set of rules could reasonably account for every contingency. If the rules tried to do so, the game would become unplayable [this is 3e]. An alternative would be for the rules to severely limit what characters can do, which would be counter to the open-endedness of D&D [this is 4e]. The direction we chose for the current edition [5e] was to lay a foundation of rules that a DM could build on, and we embraced the DM’s role as the bridge between the things the rules address and the things they don’t."
It constantly amazes me that very clever people who spend hours looking at the rules in great detail cannot integrate what these few sentences mean and, while still imaginatively coming up with new edge cases that defy any set of rules as written, still think that a complete set of rules that covers everything can be written. It's been tried before and has always failed. Even PF2, which is trying really hard to pursue the road started with 3e and then PF1, and which has created an unbelievable amount of jargon to do so, fails at covering all edge cases, despite being extremely complicated and intricate.
It's simply not the direction chosen for 5e (and for what is for me very good reasons), deal with it, folks.
@Ancalagon has laid it out clearly, creatures targeted have many possibilities, and they will obey the spell unless, to their perception (and again, so many edge cases here when the game does usually not define exactly what is seen, felt of perceived by a creature - again for good reason as the possibilities are truly endless), doing so would automatically do them harm. And neither does it mean that they have to obey blindly or without thinking. Fleeing does not mean taking an AoO if one can disengage first for example, it's clearly part of a flight.