Dissociation is the freeze part of the fight-flight-freeze response. Preventing that from happening requires a lot of daily exercise to get your overall level of stress and anxiety down when you're not in that situation. For instance you might practice grounding exercises, breathing exercises, and progressive muscle reaction. That way, when your stress levels do rise, you don't automatically slip into that freeze response.