HAAS will shut it off as you go to tool change. Even during set up, when your aiming the coolant and are in a rotate forward/rotate reverse, it shuts off and then back on upon tool rotation. High pressure through the spindle is an entirely different M-code and would be a seals issue in leaving the coolant on and or turning the through the spindle coolant with a solid/blocked tool holder or cutter.
Most posts can be developed to deal with this issue. Coolant foam is more an issue of an anti-foaming agent in the coolant itself.