"Transfer" loses its colloquial meaning at this level of banking granularity.
Interbank transfers involve two components: a message and settlement. If our aforementioned bank's customer "transfers" their $20 to another bank, the message would go across SWIFT or CHIPS or whatever, and then the sender's bank would credit the recipient bank's account at the sender's bank. (The intrabank case is trivial.)
If the customer asks for their $20 in cash or to be transferred via Fedwire, on the other hand, the latter being both a messaging and settlement system, run risk emerges. The bank needs to borrow against or sell assets to generate liquidity. (The Fed extends daylight overdraft protection [1], but that's a specific case of its lender-of-last-resort duty.)
But the bank becomes insolvent only when it is forced to fire sell assets or recognize their dubious value. Not when it extends the loan. Nor even when the customer demands their cash. At both those times, the balance sheet balances. It's just exorbitantly levered.
None of this says a bank should do this. Just that it can. In a system where deposits are loaned out, this cannot happen. In our system, where loans create deposits, it can. The former is the toy model we teach in school.
[1] https://www.investopedia.com/terms/d/daylight-overdraft.asp
In the long term... any bank that is careful not to have too many insolvent loans is guaranteed an inflow of money from the capital and interest repayments - some of which will be on their books, and some will be coming from money deposited at other banks, effectively transferring the asset cash back.
It's actually quite an elegant system at this level. Horribly fragile with respect to losses on loans though.