When QSM starts to manage a BMC device, QSM will put a rule into the PEF of this BMC to make it send SNMP PET to QSM. When this managed BMC device was deleted from QSM’s managed list, will the PEF rule be cleared?

Yes. The PEF rule which was set by QSM will be cleared from the BMC device after it was deleted from QSM’s managed list.
But if this BMC device was offline while deleting it from QSM managed list, the PEF rule is still in the BMC. This is normal behavior.