Been running a Pi3B+ access point on 5GHz (seems more stable that 2.4GHz) and noticed twice this odd behaviour.
I switched to Fake KMS (as it properly swtches off the screen after a few minutes) and
after it blacks the screen, when I move mouse and keyboard to bring it on, it has done it, but randomly switched on / off the screen again multiple times.
I managed to move to a terminal session (but it still happened) and
moved back to original firmware where it does not happen.
Did not notice anything in dmesg.