That's a good point Stig, my old Givi case would auto lock, never did so with the keys in there, but... Now the new Shad case (made by Givi) will not let you lock the keys in it, phew.
Stupidly tried to lock the car from the open tailgate* yesterday, but the clever Mercedes sensed that the key was still in the ignition and refused to cooperate with the operator error. Again, what a relief.
Tailgate has two buttons, one to auto close and one to auto close AND lock vehicle.