Ideally, our goal is to keep your pet under threshold by keeping distance from all triggers whenever possible. If they are actively avoiding or showing signs of distress (pacing, hypervigilance, tail lowered, body crouched, head low, ears back), reactivity, or aggression, they are too close, and the stimulus is too stressful. They will not learn here, and you need to help them move them further away.
Avoid adding more stress to the scenario - do not correct, verbally punish or physically punish your pet. Get their attention the best you can, and help them move away as calmly as possible.
Once treatment has progressed to the point where learning can take place, you can try setting up controlled, training sessions, at a safe distance from triggers. Ensure there is no possibility of the trigger ever reaching your pet or vice versa.
If your pet goes over threshold, they will not be able to respond to you easily in that moment. You need to get them out of that situation. Ideally, when doing behavior modification, the goal is for your pet to never go over threshold. This is why we practice in controlled settings at safe distances - keeping our pet under threshold where learning can take place.
Accidents happen and not everything can be controlled, so just always do your best with management. If your pet is actively avoiding/escaping or reacting on every outing, we need to discuss how to modify our protocol in order to make management more successful.