How to retreat from battlefield without any losses???

Example:i use Parthian Horse Archers,i am out of arrow,i retreat all my Horse Archers,then i lossed some of them,how am i gonna to avoid this?