Hard to say, it probably differs from bank to bank. I see a couple of relevant and maybe conflicting points.
- Having a mortgage will mean you have monthly repayments. That leaves less disposable income per month to pay your new mortgage. That will count against you.
- Clearing it increases your disposable income, but reduces your deposit.
For the banks it'll come down to the size of your deposit and your disposable income.
- How much would your deposit be, percentage wise, if you clear/don't clear the mortgage?
- How much disposable income would you have after paying your mortgage if you clear/don't clear it?