There countless stories of these loyal animals doing this they weren’t “trapped”. You obviously don’t know dogs.
Had a dog jump out of a window once. She was a big girl. She broke glass. House was on fire. She had a cat in her mouth accordto the neighbor.