Keyless entry fob not working but did when jumper cables were hooked up?

My son had his car flooded in Feb. We ended up getting him a used motor and new battery to get it running again (and some other parts.) After getting it back we noticed that the keyless entry fob no longer worked. We figured it was messed up in the flood and thought no big deal since it's just a school car. Well yesterday we had to jump it off because the battery died (either from not running since school got out or a radar detector left on.) While it was hooked up we found that the key fob was able to lock and unlock the doors again. But once disconnected and running they don't. Anyone know what the problem might be?

Added (1). 2008 Ford Escape, not sure of submodel?

Year, Make, Model and Sub-model and engine size would be nice. Needed to know information to pull out the right wiring diagrams so I know what the car has or equipped with in the system.

Probably low voltage from something that is draining the battery. Floods can do in a lot of electrical things.