For more than a year the employee was on leave and is unpaid leave, right? Was that leave regularised or was the leave approved one? If yes, the date of death, ie, 11th Dec 2023, should be considered as date of termination of employment for calculating gratuity. If the leave was not approved and not regularised as continuous service, then his last working day, ie, 23-05-2022 should be the cut off date for calculating gratuity. If the leave from 24th May 2022 was not approved, you should have initiated some disciplinary action against the employee. That would make the service between his last working day and the date of death unregularised.