Even though your policy may have been set up at the same time as you took out a mortgage, or made another financial commitment, they are separate products.
Your policy would pay out in the event of a valid claim during your policy term, whether or not you still have that mortgage or financial commitment in place.
It is at the discretion of your beneficiaries how they choose to use the proceeds in the event of a valid claim.