That is a very hard thing to train away because the dog does it when you are not around. There is no way to correct the bad behavior OR reward the good (when they choosing not to dig out). Add to that the fact that digging itself, and probably the act of escaping too, is highly self rewarding for dogs. Typically this type of thing requires management. So, not letting your dogs out when you are not out there with them. Or if that is not an option, constructing an outdoor kennel with a buried fence or concrete floor or some other method to keep them from digging out if they must be outside unattended. That can be pretty expensive though.
Many people crate their dogs inside during the workday so that the dog does not chew or fowl the house, so that is another affordable option. As long as it is a reasonable period and you exercise your dogs and give them access to potty just before leaving and just after coming home, this is not cruel, and will certainly be safer and better for your dogs than escaping and running loose. Most dogs just sleep away the day while their owners are gone anyway. BTW I know many border collie owners who crate during the day, there are not many dogs more energetic than a border collie and they do quite well with crating as long as they get training, attention, and exercise when the owner comes home.