But that doesn't work if the bank is allowed to put your money into T-Bonds, then your money is locked there just without the upsides.
And you can sell T-Bonds, they are as liquid as any other assets, the bank just lost money on it. If the T-bonds hadn't lost value they wouldn't have collapsed, they would have just sold the bonds.
It works usually. The bank can spread out the maturity dates of money such that they'd generally have enough cash on hand to be able to meet withdrawals. The higher yields mean they can still have some cash on hand and still pay some interest to their depositors.