You’re wrong. If someone took out a loan and withdrew all the money before defaulting the bank would not be able to pay deposits. Insured deposits would be paid by the government and uninsured deposits would go poof.
You can say the loan is a number in a database, but once it’s withdrawn from the bank the bank can’t just go into the database and undo the loan.