The costs of livestock guardian or farm dogs are generally considered a business/farm expense, of course; though this article goes into other cases, too, such as guard or rodent control dogs, service dogs, or dog expenses for breeders or dog show businesses.
I think it's interesting that the article says the IRS would require a guard dog to be certified. I wonder if there could be other ways to prove a dog is a guard dog for someone's business and/or business inventory.
I have yet to be audited, but a family member was, who took deductions for their herding dogs on their dairy farm (Corgi's) and every dog expense was allowed. Like anything there must be a true difference between personal and private, and in this case, a working dog or pet must be differentiated.
In my case I bought a barn cat hoping to get rid of some mice, BUT with 4 daughters in the house under 10, he was babied and is now a house cat. I had planned to deduct half of his costs IF he was a barn cat, but now can not deduct anything we do for him as clearly he is a pet.
For that reason I have yet to get a LGD as my daughters would not be able to handle a dog that is forever "working". However, nice fencing is deductible for up to 15 years!