She is testing and learning---this is a phase. She is trying on various strategies for size. She is learning what is and is not a threat----and how she should deal with what is a threat.
What you should do is help her to learn what you want her to learn. Get some helpers that will follow your instructions. Let them make an appearance. Praise and reward neutral behavior on her part when they first appear---you want her to learn to be wary or observant, but not aggressive. Have your helpers display strange, erratic or threatening behavior----praise and reward an aggressive warning but move out of range.
The object of the exercises is to teach her that if danger threatens her reaction should be to stick by your side like glue----and to only react aggressively on your command. And conversely, not react aggressively if you command that.
I highly suggest finding a well qualified training instructor to consult to help you manage this phase of your training. A good place to look might be to ask any handlers for referrals if you have a K9 unit in any of your local law enforcement agencies.
"I'd better go with you Huck, civilization can be dangerous."-------Tom Sawyer(Mark Twain)