Works perfect here, you sure you remembered to have a move after the M10P1?
In fact you dont actually have to move the axis, just have G0/G1/G2 etc command, for example the following moves the Z to -2 on the last move but as it is already there it doesnt move but that is enough to switch off the output.
G0X0Y0Z2
G1Z-2F100
M11P1
G1X10Y10
M10P1
G0Z-2
m30
%
Hood