If you want to transfer, you must pay off the loan and lift the mortgage before you can transfer.
Of course, it can also be auctioned by the court, and the bank agrees that part of the proceeds from the auction will be repaid to the bank and part will go to the notary creditors.