The miracles of modern security systems make this once unavoidable scenario very preventable
For outdoor perimeter security, you have two basic options. A Passive Infrared (PIR) motion detector or a Photovoltaic Beam detector.
The PIR operates by detecting changes in the temperature of the scene in its field of view. The heat of a person passing in front of an empty deck will trigger the sensor to alert the alarm system. Many PIRs have what they refer to as “pet immunity.” Basically, the bottom part of its field of view is blocked, so short animals won’t register a disturbance. They are reliable instruments and are hard to fool, but they often register false positives. If the device is mounted outdoors, then wind, rain, leaves, or moths close to the device can trigger the alarm. The problem isn’t as severe inside, but false positives are still very common. The PIR is easy to install, cheaper, very difficult to elude.
Most of us have experience with Beam Detectors in our garages. Powered garage doors have to have a beam detector on it to ensure that it will not close down on something if the beam is interrupted by car, person, or pet. It operates with a transmitter and receiver. One end transmits a beam, and the other receives it. If there is something in between the two devices, the receiver will tell the door not to close, since something is in the way. In a security system, the detectors should be installed so they are slightly above the height of most dogs, and thus anything passing between the two will interrupt the beam and signal to the alarm system that someone is intruding. The beam is difficult to install more expensive possible to evade if you are aware of them; see Catherine Zeta-Jones in Entrapment