How are recessions even possible if its impossible for banks to lose money? When a bank issues a loan, the money must end up with another bank. Therefore, the banking system as a whole can never lose money. Only the dumb banks which make loans that arent repaid can ever lose money.
Therefore, is a recession only possible if there is a divide between &quot;smart&quot; and &quot;dumb&quot; banks? Is it the case that, in any recession caused by bad loans, there must always be at least one smart bank somewhere that is profiting and solvent? Since the money has to go somewhere it seems there always has to be at least one bank that is least dumb and ends up with all of the money from others. In fact, the only reason m2 would fall at all is a composition effect whereby the dumb banks are more leveraged and fail.
Recessions are defined as fall in output (usually measured as a consecutive two quarters of negative GDP growth) not loss of money. Output (GDP) might very well fall even when firms are on average more profitable and people earn more money.
For example, in the 2020Q2 the median wage in US actually increased according to U.S. Bureau of Labor Statistics, yet US experiences unprecedented $32.9\%$ GDP decline as reported by Bureau of Economic Analysis.
How can that be? Well it is because the lowest paying people are more likely to get unemployed. In the same way, most of the time you will see the least profitable firms stop producing during recessions not the most profitable ones. Hence even when output of economy declines those who remain employed and economic active might actually earn more so the idea that recession is caused by firms or banks loosing/retaining money per se is simply fundamentally wrong. Its not the loss of money, but loss of output that matters.
Generally speaking recession occur when either aggregate demand or aggregate supply (or both) fall, which in turn leads to loss of output. This is because when aggregate demand falls this means people want to consume less goods and services and hence firms will also supply less of them, and when aggregate supply falls the production is affected directly (figure below shows some graphical examples).

Aggregate demand changes for example in response to changing incomes, wealth, inflation expectation or interest rates and aggregate supply in response to technology shocks, changes in firm costs etc. These are just an examples,  you can find more exhaustive discussion in macro textbooks for example Blanchard et al. Macroeconomics: an European Perspective is an excellent resource.
Most recessions do not even originate within the banking system. Rather banking system can be thought of  as an economic highway through which macroeconomic shocks propagate to the rest of the economy. For example, it is generally accepted that Great Recession was caused by collapse of housing bubble not with banks themselves. Rather the banks played role in propagation of the recession. Furthermore,  banks can also exacerbate recessions due to the role they play in money creation as fall of money supply can make recession worse while expansion of money supply can help alleviate them but exploring this is beyond scope of this answer as your question is about how recessions occur (these issues are discussed in most macroeconomic textbooks you can again have a look at the above mentioned Blanchard's textbook).