When and how you program the change
The change always goes in a transition block between operations, never in the middle of a contour. The sensible sequence is: retract in Z, coolant off, cancel cutter compensation and canned cycles, stop the spindle, go up to the reference point with G91 G28 Z0. and then T and M06. After the change you rebuild the state: G90, the G54 work offset, the positioning, the spindle and G43 H. Writing that whole block in every tool also lets you start the program part way through, at the block for any operation, without inheriting the previous state.