Using Snapmaker2 V1.19.0 it is not possible to cancel a CNC job from starting if the door detection is enabled and triggered. The only way out is to reboot the machine hard. Please add a return button or allow to disable open door detection in this menu:

Note: This is the menu right after setting the machine origin for the selected job.