Not sure where you try to change it - I was talking about firmware solution, so you must edit configuration.h best with config tool. There you have per extruder:
/** You can run any GCODE command on extruder deselect/select. Separate multiple commands with a new line \n.
That way you can execute some mechanical components needed for extruder selection or retract filament or whatever you need.
The codes are only executed for multiple extruder when changing the extruder. */
#define EXT0_SELECT_COMMANDS "M117 Extruder 1"
#define EXT0_DESELECT_COMMANDS ""So you have one script per extruder, no overlapping.