Oh... Someone mentioned something above that I also wanted to second... I was going to buy one of those wireless fence systems for my property. A professional dog trainer told me it would be a waste of money with a Great Pyrenees. These dogs are very independent thinkers and those systems would...
I think part of it too is your dog understanding expectations (in time) from you. My fenced backyard for my dogs backs up to my chicken & duck pens. So my dogs are around them (look but don't touch) every single day. If a critter (coyote, fox, coon, etc) shows up sniffing around my chicken pens...
I have a Great Pyrenees - Husky mix. She killed at least 2 young pullets when she was about a year old. When dogs are young, they play... Everything is literally a potential toy. After losing those birds, I assumed she was no longer safe around any of my birds so I stopped trusting her around...