You would need to check for the system singal SIGKILL (aka 9 in linux), but I don’t know that godot provides an easy way to do that. In any case, you shouldn’t be doing that without a very good reason.
Because of the way the kill signal works, there is no guarantee that anything you do from the godot side would run, so the most reliable option would be to pass the PID to the python script, then regularly check if that process still exists.