Signs point to seriously are you that dumb

I had the same problem with my neighbor and my dog. Although my dog isnt a working guard dog
I trained him not to leave the yard. And he wouldn't he stayed inside at night and I would let him out during the day and he would never ever leave my little 1 acre lot. Well I got home from work one day and he wasnt home. I was like wth were is he. So I started hollering for him and he came from the neighbors yard. I scolded him he tucked his tail and went in the house. A couple weeks later I was outside with him and I could here the neighbors kids hollering my dogs name. I was like wtf! I was pissed Marshall (my dog) started to go to them and I quickly said NO! And he came back. So I went up there and told them. Stop calling for my dog I'm trying to train him to not leave the yard he isnt a neighborhood dog he is my dog I don't want him wondering around like a stray. So I thought it had stopped. A couple weeks later it was getting dark so I went outside to let him in and he was gone. I hollered for him walked everywhere, drove up and down the road for hours. He was gone I was so upset. Well it was about 10 pm I was still looking for him and yelling for him and I heard him start barking (he has a very unique bark) so I walked up to the neighbors they have a large fenced in property with gates because they have cattle. I saw the same kid I talked to before I said Dillon have you seen my dog? He said yea he is at the house. They got him up there and shut the gate so he couldn't get out. Walked up to the gate and he saw me and ran to me and jumped in my arms. I was so pissed I chewed them all out. After that I got one of the wireless electric collers and it never happened again. But still I shouldn't have had to spend 300 bucks on the coller when I already had him trained and they broke his training.