The dog ran away. Loneliness affects not only people but also dogs. These two were best friends until they shared a common fence. And now, when one of them gets too lonely, she runs away to hug his best friend.
To start with, dogs are pack animals. They demonstrate their status to each other always and everywhere. For example, if a dog lies on her back, sticks the stomach – she says it “I obey you, my status is below yours, I’m weaker, I agree.”
The other dog may jump up, knock down, to show the teeth, thus showing that it is the status of the above – “I’m stronger than you and better, if anything, I should win nonmatter what”.