You would need to configure a M143
heater protection instance to trigger a power shutdown. Something like this:
M143 H1 P1 S300 A3 ; Set heater 1 monitor 1 to trigger printer shutdown if temp exceeds 300C
see https://duet3d.dozuki.com/Wiki/Gcode#Section_M143_in_RRF_3_01RC2_and_later