PIC works fine when 5V supply is continues.
What exactly do you mean?