Probably depends on prosecutor. I think law stipulates protection of humans or livestock, pets being neither.
Since most people consider their pets as their children, I can’t imagine anyone NOT defending them with deadly force. The Arizona State Judge who taught our CC course explained to us what to say to the police and/or prosecutor to avoid any repercussions for having saved your dog or cat. Good guy…