Of the last few commands, which were executed when the kill() command was executed?
Was the nozzle heater off? Was the bed heater off?
We need to be careful here: the kill() command could have turned off the heaters, so if the heaters are off, we can’t be sure it was the kill command or the actual commands were executed. If they were NOT turned off, then we have confirmation that the kill() command doesn’t turn them off and the commands themselves were never reached. So at least we can learn SOMETHING from those lines.
I’m not sure how or if one can tell that relative positioning mode is turned on, so we’ll ignore that.
Did the filament retract first?
That’s fairly easy to tell if you have a Bowden tube but with direct drive, the retraction is so small you might not notice.
The last three are easy to spot if they were executed.
I’d suggest re-running your gcode with the core of it snipped out. Leave in the setup code. Leave in the first layer. Leave in the last layer if it sits on the first layer. If not, leave the last layer out. End it with the closing code. This should make testing substantially faster.
At that point re-run it and confirm it’s behaving the same way.
If it repeats itself, keep re-running it but delete one line from the bottom each time until you find the command that triggered the kill() command.
Once you think you’ve found the fatal command, try re-loading the original gcode but with that command deleted and see if it works.