It would be interesting (to me, maybe not to you

) to wire up a couple of LEDs to the locking system and mount them temporarily in a visible location. Have one LED triggered by the lock relay coil and one on the relay output (probably pin 30 of the relay). Then, when the re-locking occurs, see if both LEDs blink at the same rate as the locks cycling or if just the LED on terminal 30 does. If just the one to the locks blinks, then replacing the relay should solve your issue. If both blink, then you will need to figure out what in the GEM or RAP module is triggering the lock circuit.
-Rod