There is something shorting out causing a signal misdirect. If the lock and unlock don't cause this issue, then the alarm wire might be shorting across the lock causing this issue OR not a solid connection. Hitting the alarm should both set the alarm and lock the car.