How long can PIC18 keep RAM after being powered off?
The PIC RAM is all CMOS static.  Apparently the capacitance saves the data sometimes for a while after powerdown, but this is by accident and nothing you can rely on.  It's not designed to work that way.

The only safe answer is that you have to assume all of RAM gets scrambled when Vdd goes below the minimum RAM retention voltage listed in the datasheet.  That is usually lower than the lowest operating Vdd, but I haven't looked it up for that PIC since this is something you can easily to yourself.