In a taxable account the moment you sell those shares, you have a transaction that has tax implications.
If the investment is in a retirement account, pulling the money out of the retirement account can also trigger penalties, depending on your age.
We sometimes see questions related to selling investments but keeping it in the brokerage account to delay owing taxes. In those cases keeping the funds in the brokerage account doesn't avoid it being a taxable event. Thus moving the money to your bank will run into the same problem.
Of course if you sell losers then there wouldn't be any capital gains. But then you might run into a situation if you repurchase the shares too soon and run into a wash sale issue.
Now if it was in a retirement account, and you rolled it over and took possession of the funds, then deposited them in the bank, and then moved them into another retirement account (or even the same retirement account) before the 60 day window was up; you could avoid the taxes and penalty. Except the lender might not be comfortable with the last minute influx of money. They always want an explanation regarding the source of late large deposits.
Information on the 60 day window from the IRS:Rollovers of Retirement Plan and IRA Distributions
60-day rollover – If a distribution from an IRA or a retirement plan
is paid directly to you, you can deposit all or a portion of it in an
IRA or a retirement plan within 60 days. Taxes will be withheld from a
distribution from a retirement plan (see below), so you’ll have to use
other funds to roll over the full amount of the distribution.
Because you updated that the money is in an IRA, and the lending bank also has IRA accounts, you can just transfer the money without worrying about the 60 day window. Please check that this will meet the requirements to get the better loan rate. Also some banks don't have as many options regarding IRA investments, so the money might still only be in the bank long enough to meet the loan requirements.