Dogs need corrections at the time of the misdeed, not punishments.
Positive reinforcement is more successful than disciplining a pet.
When you catch her misbehaving, use distraction to pause the behavior then redirect her attention to something else. The type and intensity of correction needs to be just enough to distract her from the unwanted behavior, no more or no less. You can use a toy, treat, clapping your hands or using a shake can (tin can with pennies or marbles inside it). If you correct her and she shakes, cowers or shows signs of any type of fear then your distraction method was too harsh. Praise and reward her when she responds. If she persists, cease all interaction until she settles down or responds positively. Be patient and be consistent. Her aggression could be a response to your frustration or the punishment.
Keep
training sessions short to maintain her attention.
Work with her when she is not misbehaving and teach her obedience, tricks, get her out to play, chase the ball, go for long walks, whatever it takes to get her plenty of exercise and TIRED. Get her a
puzzle treat ball to keep her mind occupied when you can't directly supervise her. A dog that is physically and mentally occupied is less likely to get into trouble in the first place.