OMG! That had to be terrifying! It has happened to me before also... I have to tie a knot in the hand loop of all my leashes bc I have small hands and the leashes can pull off my hand easily if I don't knot them.
I had one of mine actually pull out of her harness. Tug, tug, when I turned and looked, she was loose! On the busiest road we cross too! She didn't go far, Thank God. I didn't think they could slip out of a harness, especially as easily as she did it. And it was adjusted so only two fingers would fit under all around. I have changed them over to a harness similar to a buddy belt, and that seems to be working better so far.
Do be careful though. I believe they can feel when we're changing hands, and they will try to take off.
The fight or flight reaction will cause the anal glands to automatically release. If it's inconvenient to give them a bath when that happens, a bit dental rinse on a cotton ball will kill the odor, just carefully wipe around the anus.
So glad she's okay... and you too!