How can I stop my dog from digging holes?

My dog keeps digging right by the fence and just leaves. I dont know if its because the other dog we had got lost, but she keeps trying to make holes so she can leave... If you have any ideas on how to stop her from digging or at least to keep her from leaving because we have to run out and look for her almost everyday