Why exactly did she need to attack the soldier? She would have only needed to keep hiding. Humans, especially those not specially trained, have a hard time to remember to look up. It was also demonstrated in this chapter. After those dudes had checked the immediate vicinity, not finding anything, they would have moved on, assuming she was running in some direction. As long as they don't have dogs with them, she could have used an opportunity to escape for real, as soon as the prince had run out of patience and left the place as well. Of course there's a chance of failure, but from what I can see, attacking those soldiers for no sensible reason carried an even higher risk. As expected, she was caught immediately.
If she wants to be someone important, she should start to use her brain a little bit more.