If you are using MPLAB® X IPE and a Microchip programmer (PICkit™ 3, MPLAB ICD3 or MPLAB REAL ICE™ In-circuit emulator) and the device is programmed correctly (Programming/Verify complete) but subsequent Verify operations fail (even though the device is not code protected), it is possible that the code itself is writing to the flash or electrically erasable programmable (EEP) memory. This happens because MPLAB X IPE doesn't keep the device in reset after programming.
The MCLR goes from high to low to high depending on the programming process. The PIC® is erased, programmed and verified before the electrically erasable programmable read-only (EEPROM) is programmed and the MCLR goes low and high in between these steps. To avoid the EEPROM data being corrupted, we recommend adding a delay before the EEPROM write. The delay should be longer than the duration of MCLR in a high state so that the EEPROM is not written into before the verify happens.