@Greg_Nutt I already opened an issue on github, bc it is a little bit more complicated than that
FWIW this does in fact work but the toolchange height for Z does not take effect until you actually move the z axis. This is a side effect of treating the toolchange height the same as workspace coodinate changes. SO in the end it works it just won;t show the height change if you just move X or Y. This may or may not be the correct way to do it. But as extruders are not covered by the NIST gcode spec who is to say what is right or wrong
To make this height change immediately on T1 would violate the NIST spec as M6 is what is supposed to do the actual toolchange. so a compromise needs to be found. The OP found a workaround by adding a G0 Znnn in the toolchange script, where nnn is the current z height…