Dead nodes are tracked by DatanodeManager's datanodeMap. However, after NN restarts, those nodes that were dead before NN restart won't be in datanodeMap. DatanodeManager's getDatanodeListForReport will add those dead nodes, but not if they are in the exclude file.
The issue here is the decommissioned dead node JMX will be different after NN restart. It might be better to make it consistent across NN restart.