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). (Using translation from Aḥmad 1024)
قَالَ عَلِيٌّ مَا مِنْ رَجُلٍ أَقَمْتُ عَلَيْهِ حَدًّا فَمَاتَ فَأَجِدُ فِي نَفْسِي إِلَّا الْخَمْرَ فَإِنَّهُ إِنْ مَاتَ فِيهِ وَدَيْتُهُ أَنَّ رَسُولَ اللهِ ﷺ «لَمْ يَسُنَّهُ»