Such things only lead more to local customs or habits in the matter of paying debts, but if we direct it at the government, of course it will lead more to the rules of the government itself. However, my Koran teacher once said that a child has no obligation to pay his parents' debts that were made by his parents in the past. But because most children always love their own parents more, of course they are also not willing if their own parents are still in debt to other people so they prefer to pay it directly even though it is not their obligation as a child.
In the current loan system, it is an obligation for families to pay off debts if the person concerned dies and even in my religious law, it is an obligation to pay off the debt so that the person concerned can be at peace in the afterlife. If referring to religion, maybe most people will think differently, but that's how the law is in my religion because debts must still be paid.
It's different when dealing with the government, the debt that is inherited to the next government will definitely run by itself because there is an agreement between one country and another. If the debt cannot be paid off, it is better not to take it and that is if it relates to each individual.
Depending on the country where you live, the laws can be vastly different, since in most countries the debts you may have with the government are inherited in the case of your demise, however any debt with a private entity is immediately forgiven, it is because of this many companies and businesses refuse to give loans to the elderly and to the sick, since they do not want to lose money in the case of their death, however it seems that now insurance companies are taking part of that risk by giving insurance to those people so those businesses can offer them loans.