Banks in a crunch don’t look for deposits. They approach the Fed’s discount window [1].
Capital requirements aim to ensure banks have enough high-quality collateral to borrow sufficient reserves in most catastrophes. (When the situation threatens to exceed that threshold, we call it a systemic event.)
[1] https://www.federalreserve.gov/regreform/discount-window.htm
The discount window is used when the bank is unable to access the interbank market which is usually an indicator the bank is expected to fail. The discount window provides liquidity for high quality assets at high costs (which is why it is called the discount window).
If the bank runs out of high quality assets and can’t raise capital it becomes insolvent (bankrupt) and the FDIC takes over the bank and winds it down.
This is true for the largest banks. For many smaller banks, interbank lending is cheaper than deposits. Particularly if those deposits must come from new customers.
Your model is roughly correct over long, strategic time periods. But in tactical timeframes, deposits are assumed fixed or lightly. (In fact, the post-97 role of money centre banks has been to attract deposits to then lend to smaller banks.)
Regulators however are less than thrilled if these imbalances persist long term because banks that rely heavily on hot funds tend to experience runs.