There is codes stored inside RPMB sector , to delete these codes we need to clear data from that sector.
If the memory is EMMC type :
1- for Samsung , update memory firmware
2- for Micron , do final write
If the memory is UFS type:
Only Samsung memory can clear RPMB sector using RESET UFS.