But the problem bankrupts in the UK have (or had - it may have been amended) is that the home belongs not to them, but to their trustee in bankruptcy. I saw cases where the trustee came back years later and sold the house over the (by now) former bankrupt's head, paying off the mortgage loan, and then making a distribution to creditors from the balance.
And of course the former bankrupt had to find somewhere else to live if he could not afford to buy the house back at the market price.
So the bankrupt would normally (if he was financially capable of paying the mortgage) arrange for (say) his wife, or a relative he trusts, to buy out the trustee's interest in the property, which might not cost that much if there is little equity.
It is true that in the UK, bankruptcy - alone - rarely, if ever, precipitates eviction. It is actually beneficial, rather than prejudicial, to the secured creditor.
I am reminded of the Jubilee Debt Campaign, where I was at first surprised to see the banks backing the campaign to relieve heavily indebted nations of debt. It took a little time to realise that if sovereign debt was forgiven, then there would be that much more free income to pay the bank debts.....D'oh...!! "Any economic unit can emit money. The serious problem is to get it accepted" Hyman Minsky