I've never had that problem. All my snakes ignore my dogs and cat. Whether the snakes are caged or out. Also the dogs and cat show little attention towards the snake.
Now I have had Butch, one of my Boas slam into the glass a few times while in hunger mode when I walked by.
Butch, Wild Type BI