I had that happen last summer on July 4th. One of ours went out for her last wee wee just at the time a neighbor fired off a display that sounded like a battleship salvo.
Thankfully a family about a mile down the way grabbed her.
During Stampede, the Grandstand Show closes with a 20 minute fireworks display. The Stampede Grounds are 2.5 miles away. One of my ‘girls’ growls, barks and snarls at the fireworks. The other just ignores them. In August, there is an international fireworks competition at Eliston Park, 1.5 miles away. No one gets much sleep until they are over!