Fobs have a power source inside that can get too low to power the doors. This can become confusing especially when both fob's batteries start to fail at the same time. Usually the first suggestion is to replace the fobs' battery as that's the easiest and cheapest fix (not to mention you now have to new batteries so wont have to worry abut it for a long time).
Next is to power down the RV completely (remove all power sources) and bring it back up. This may result in the auto lock/unlock with fob system to reboot. I know someone who had a similar issue and it was all due to the way they had turned their vehicle ignition accessory on and off (not starting the vehicle) and it put the fob learn system into engage. The vehicle kept waiting for a new fob to be learned so it didn't work properly until the reset.
You can also find out where the fobs' receiver to the system is located and make sure you have nothing on, over or around it that could be causing sporadic blockage of the signal. On my POV, I always thought the receiver was in the dash or the infotainment system but it turned out it was actually up by the rear view mirror overhead console to maximize reception. Fortunately it was under warranty and the issue I had was caused by an electronic entry tag mounted at the same location.
1994 Itasca SunDancer 21RB - Chevy G-30 chassis.