It will depend on your lender as to whether they'll do it, but basically it's a security swap - you release the property you're selling, and replace it with a term deposit at the same bank (which is funded by the settlement proceeds that would normally be used to discharge the loan).
Then...