Length of hospital stay is a very difficult outcome when there is a non-trivial risk of in-hospital death because hospital stay may come to an end because of either recovery (good) or death (bad) and the difference matters if you’re trying to interpret it as a standalone outcome.
Censoring in-hospital deaths on the date of death implies that discharge is an event which may occur with further follow-up, which it isn’t. Death is a competing event. And in this case it is diametrically opposed to the event of interest, so it can’t be analysed as a combined event as for, say, progression-free survival. The simplest solution, which happily solves your data problem, is to treat the deaths as permanent hospitalisations. That is, censor them at the end of follow-up.
This post has some more discussion and references, including an example of the suggested approach to censoring deaths from the RECOVERY trial:
We used Kaplan-Meier survival curves to display cumulative mortality over the 28-day period. We used similar methods to analyse time to hospital discharge and successful cessation of invasive mechanical ventilation, with patients who died in hospital right-censored on day 29.