Are you sure its a similar issue? Because usually closing the window actually doesn’t solve it, as then reopening another X11/XWayland window will still not register keyboard presses. I am adding some more info to the post right now.
I wonder what it takes for us to unlock this ability of ours. It happens so randomly, and always just a few minutes before the alarm. One time I woke up the exact minute prior to the alarm going off. Abd was wide awake even