Loans create deposits.
Deposits in a bank never go anywhere. All that happens as you “move” money around is the ownership tag changes. And that tends to change the price the bank has to pay on those deposits.