In this case, they can file, rollover the debt into a new company with no financial loss and then recap the equity with Musk (who obviously has the money to do so) and other shareholders.
Also, the banks who own the debt do not want to run Twitter. All they want is to be able to mark the loan as performing...that is it. In cases where debtholders take over the company, the debt has usually been sold for significantly less than par to someone who wants to run the company. This isn't the case here because the debt is still worth par (imo, largely because it is obvious that a recap would be straightforward...it may be the case that Twitter's financial position is significantly worse, but we will need to wait and see).
Obviously, the question for the leases is how much it is, whether it is worth it, whether the landlord thinks they can get a new tenant (unlikely at this point), and whether the company can be relocated...the lease would have to be a rather large proportion of expenses to make this all worth it...but it may be worth it if the company is going to recap anyway (which seems likely).