Will stray dogs who used to be pet dogs miss their old lives?

I will definitely miss my old life, but I miss my former master the most.

A family in my community moved and abandoned the dog. The dog has been wandering around and feeling depressed.

A few years later, by chance, the family came back, and the stray dog went directly to find its owner, very happy. ...

I felt like crying at that time, but my family disliked it.

I feel really angry, but I can't help it. I can only take it in myself, but I feel that dogs still miss the first owner the most.