I use "stop print".
I have not made any gcode changes. all default:
; Sample stop code - modify to your needs!
M400 ; Wait for current moves to finish, clearing the buffer
M104 T0 S0 ; Disable extruder
M140 S0 ; Disable bed
G1 X0 Y225 F9000
M84 ; Disable motor