Apropos vt switch, I believe, thats the root cause of this issue and the blank-after-unlock bug. If we have a vt switch (e.g. "sleep 20 && loginctl activate cX" in the examples above) *after* the lid was closed, then the system suspends; maybe because the new session has no inhibitor lock. When the lid is open, the screen gets turned on for the new active session. When we switch back to the original session, the screen turns off, because on this sessions it was deactivated, but never reactivated.
I've tested this behavior on text vt's and there is the same retroactive suspend reaction of a closed lid.
Apropos vt switch, I believe, thats the root cause of this issue and the blank-after-unlock bug. If we have a vt switch (e.g. "sleep 20 && loginctl activate cX" in the examples above) *after* the lid was closed, then the system suspends; maybe because the new session has no inhibitor lock. When the lid is open, the screen gets turned on for the new active session. When we switch back to the original session, the screen turns off, because on this sessions it was deactivated, but never reactivated.
I've tested this behavior on text vt's and there is the same retroactive suspend reaction of a closed lid.