If you've got an earlier 1995, then these had issues (which later BECM firmwares fixed) with spurious RF causing the BECM to freak out and constantly lock the doors.
Later BECM firmwares obviously has something written into them, so that if it got an overload of RF then it would only relock the doors a couple of times I think, before it would then not try to drive the motors again.
I saw it a LOT on earlier vehicles where the front door latches would burn the motors out, but for whatever reason (maybe because they were driven by the BECM directly, not the outstation like the front doors) the rear ones never suffered this fate.
The bad news for you is that you need 2 new front door latches to fix it. From what you have described, all the latch microswitches are working as they should - the key is unlocking/locking the vehicle and setting/turning off the alarm/immobiliser. The drivers loor lock will always lock/unlock with the key in the door as it's mechanical. The microswitch is obviously triggering as the BECM sees the change in state and locks/unlocks the rear doors, but the passenger door doesn't do anything as the motor is burnt out. Likewise, when you lock/unlock the passenger door with the button in the door card, it is mechanically locking/unlocking that door, and triggering the central locking switch. The BECM sees this and signals to lock/unlock the other doors - but since the drivers door motor is burnt out, it won't do anything.
The best overall fix for you would be replacing the 2 front door latches, and an upgraded RF receiver (I'd say one of our fob filters as they're cheaper, but we don't have any at the moment - maybe in a few weeks if we can actually order some parts that have been unobtainable the last couple of years!).
Just be aware, that if you replace the front door locks, and not the receiver, then it's entirely possible if the BECM gets flooded with RF, then it could trigger the doors to lock and this will then cause the motors to burn out again. I've seen it before when someone replaced both latches, only to have them cooked again in a couple of months. With the updated receiver/RF filter this filters out EVERYTHING other than a P38 key fob, so the BECM is kept blissfully unaware of any other RF, and thus will only drive the door lock motors when it has received a valid lock/unlock code (or the key is turned in the drivers door or one of the front locking buttons is pressed.
As Gilbert says, some of the earlier MG latches work in a P38 - though some have an extra wire as I think they supplied a signal when the latch was locked aswell as when it was unlocked - from what I can remember anyway.
I think I have a RHD/RHF (drivers) latch in the early style (with the connectors moulded into the latch body) here which I refurbished aged ago for someone. I can't remember if I have passenger side too.... The later (version 2) latches would also work in your vehicle as the main 6 way connector is the same - but you would need to cut/ connect the black ground wire as the connector for that is different from V1 to V2 of the latch. The later V3 latches (whilst physically/mechanically the same) have a single connector on them, which is only compatible with the post '99 vehicles.
Hope this helps.