Once a dog learns establishes this habit it is difficult to break. Especially if they escape when you are away. I would seek ideas on making your fence more escape-proof. The best way of breaking this pattern is by preventing it from happening. I would recommend some training as well.
Dogs get bored and look for things to do.
The grass is always greener on the other side. First, you have to create the interest in play. See if your dog enjoys fetching or tug toys. Try different toys, i.e. balls, squeakys, fuzzy animals. Once you get your dog's interest, then start a routine of play.