I just don’t get this. Issue a room key that is one time only.
Or don't issue a key at all (that was my hotel iso experience).
Leave the room - door shuts behind you - ringing reception to ask for access to room - filth know you have left the room.
OR
Leave the room - stick something in the doorway to stop the door closing - hall guards see the door chocked - filth know you have left the room.
Leaving the room has been detected easily.