Jasper is protective of his territory, too, so
...as a pup I tried to teach him to "bark" on cue-then the cue "enough" (Like the QUIT suggestion) to stop
I tried to say Bark! while he was barking...etc.
(he stopped barking to look at me since he thought it was so weird of me....)
He never did get it to Bark on cue, but eventually he did get the "enough" cue to stop.
I'd say 'enough' the minute he took a break and praised---good boy!
If you can anticipate losing her attention before it happens, you might distract her.....
ie.) call her to you to sit/give treat/praise
or use toy to engage her first.
Teach her an alternate behavior.
I heard a story that when they were trying to get a dog adopted at the shelter who barked at everyone...the y took a pvc pipe and ran it from the front of the kennel to the back, so when people approached-they put a biscuit in the pipe that came out at the backside of the kennel...so the dog learned to run to back of kennel when people approached---clever?
It just takes time!!!