Wouldn’t they just end up selling the stock to pay the loans, and pay taxes then? It seems more reasonable that they’re betting on the stock values increasing more than the loan interest rate
So the borrower should never need to sell enough of the stock to seriously affect the price, and the tax is only payable on a small number, not a big one.