Question: what do you do when your dog keeps running away?
Answer: Play with or walk her every day.
Give her fun toys while you're gone, including puzzle toys to keep her busy.
Keep your dog inside when you can't watch her.
Take her to doggy day care or have a friend walk her if you'll be gone for a long time.