Depends on the lending provisions. The government employee Thrift Plan loans have a fixed schedule with fixed payments ~ and I don’t recall any sudden death provision in them.
Leaving Federal Service
When you leave Federal service, you must repay your loan in full within 90 days after your separation is reported to the TSP. Your repayment must include any accrued interest on the outstanding principal balance.
https://www.tsp.gov/planparticipation/loans/nonPayStatus.shtml
Source of info re the loan repayment within 90 days.