I think it's a default feature of renpy, you can see it in the 'help' section of the pause menu. It uses the H key which is the same as what you've got to show hints. During dialogue pressing H hides the UI but doesn't show a hint, and in the 'wander around the room' mode it's the reverse. I tried replicating the bug just now but couldn't (the UI comes back as normal), so it might have just been a one-off unlucky timing thing, or maybe something on my computer's end. It happened during the first puzzle room.
(also about the key thing, I phrased my first comment wrong - i knew the drops don't clean the key, it's just that the filled bottle cleaning the key automatically didn't happen for me. I'll just reload a save and try it again)