If I carried out the hadd punishment on a man and he died, I would not feel upset, except in the case of khamr; if (such a man) died, I would pay the diyah (to his family) because the Messenger of Allah ﷺ did not prescribe it (did not specify a particular number of lashes).
مَا مِنْ رَجُلٍ أَقَمْتُ عَلَيْهِ حَدًّا فَمَاتَ فَأَجِدُ فِي نَفْسِي إِلا الْخَمْرَ فَإِنَّهُ لَوْ مَاتَ لَوَدَيْتُهُ لِأَنَّ رَسُولَ اللهِ ﷺ لَمْ يَسُنَّهُ