Paying interest is horrible. Unless your investments are expected to do better than the interest rate. No way I would pull money out of the stock market to pay off my 2.25% mortgage.
Edit: Suppose you had a 500k investment paying ~5% you could sell to avoid a 500k mortgage at 6% that seems like a good idea. Unless you’ve got a high paying job so you could get a sweet home mortgage tax deduction.
Similarly, a dividend paying stock may have returns of 5% but if you’re paying capital gains when selling that stock you’re also getting 5% of money that would disappear when sold. IE If you would keep 500k on sale a 550k investment paying 5%, it’s effectively paying you 5.5% of 500k.