A)) OK, hope I'm not repeating something you already know, but the way that system works (same as the door locks in my 2015 MB Sprinter, BTW) is that opening the rear gate is a two-step process:
1) operate the arming switch -- either the switch on the driver's door, or the key fob rear gate switch. All that does is "arm" the system, for a finite period of time -- maybe 15-20 sec.
2) Then you operate the switch under the rubber cover in the back, and that triggers the solenoid to operate the latch and release the door. If you attempt to open the rear gate without first operating one of those two switches, nothing will happen as there's no power to that solenoid; the system must be armed first.
So -- IF the switch in your driver's door (or the key fob?) is in an "operate" position all the time, the latch will close and latch but never lock, as the system is always armed -- any lifting on the rubber and the solenoid will activate. (Does leaving it alone for a minute lock the liftgate?)
The reason I say this is because my driver's door window switch assembly got flaky last year, causing the driver's window to not operate correctly. Being the cheap so-and-so that I am, I pulled it and was amazed at how much crap had filtered down into the assembly. After cleaning it out, it's worked fine.
Yes, the rear gate and fuel door switches are lower down, but I'm certain they're the same type of switch and could fail for the same reason.
B)) The other fail point, as mentioned above, could be in the mechanism itself. There's a rod in there that can become corroded and not fully retract to its OFF/Locked position, however that generally results in the rear lift NOT latching. I ended up replacing the entire mechanism, but also had to insert a resistor -- apparently new liftgate latch mechanisms have a lower resistance than my 2005 had. Whatever the reason, it simply would not work unless I added that resistor.
If you PM me, I can provide some pics via email-- adding pics here is too much of a hassle.
Hope this may help--