Not directly, no.
The impact of firms and people going bankrupt that other people making investment and lending decisions will see risk more clearly and may (for a time) be less greedy and stupid when they make capital allocation decisions.
Debts can & do magically disappear. To be clear someone paid for the lost money, but at that stage it's far too late for them to be able to do anything about it, let alone raise prices.
Here's an example:
Founder A founds a startup with equity funding from B & C.
Later they take loans from D & E.
They spend all the money but never become profitable.
None of the original investors or lenders is interested in pumping in good money after bad.
They voluntarily declare bankruptcy or they default on a loan and D or E forces them into bankruptcy.
Either way, whatever is left of the company's assets are sold to reimburse, in part, the loan D & E made. A, B & C got nothing.
A, B, C, D, and E, all lost real money.
But by the time this loss is crystalized, there is no way any of them can go back in time to raise prices to pay for it. It's gone and so is the company. The only thing they can do is act differently in the future.