I'm no vet or even an amateur at coding but I tried this.
Created a game logic, named it CP(for central point)
created a trigger for each soldier, Condition: soldier1 distance CP > 15
OnActivation: soldier1 setcaptive false
(I'm not sure how to create an array in a single trigger to include all soldiers at once.)
After Trying this it seemed to work well unless a soldier ran away in the opposite direction of the guard (the guard would not react unless the unit come back within range of the guard) Other units of the guards side would respond accordingly though.
To remedy this I just added more guards surrouding the holding area. I'm sure someone else would know a better work around though.