So, you run away, and then he kills your kid, or some other kid, that happens to walk on by a few mins later. Great strategy.
One is not required to stand their ground lest a violent predator assault someone else. If you feel you must and live in the civilized world, you should probably become a legal law enforcement officer of some sort. When they face drug-addled machete weilding assailants, they usually have the advantages of both lethal and less-than-lethal weaponry (which may or may not be available to civilians, depending on your local laws) and the amazing force multiplier known as "backup".
Note, I am not saying one should never stand one's ground. The decision to do so will depend on a number of factors that will would be foolish attempt to lay out in an internet discussion. And generally, the answer to "was that the right decision?" is only known in hindsight.