Check the rear gate lock actuator.
Is the rear gate lock actuator OK?
It is possible that temporary poor contact occurs. Check the connecting condition of harness and connectors.
Replace the rear gate lock actuator and door latch assembly.