I don't know if this will help, but I thought I'd post it, just in case.
I learned much about mate-screensaver in writing my touchscreen utilities. I had a problem with one of my scripts that interfered with the screensaver's ability to lock the screen. My script wasn't actually preventing the lock, but delaying it.
Through some investigating, I learned that choosing Suspend from the list that drops down when you click the computer icon in the top panel really just does the same as executing the command systemctl suspend from the command line. And that command does not lock the screen.
Whereas, if you instead select Shutdown from the drop-down list, and then click the Suspend button in the "Shut down this system now?" dialog box, it has the same effect as executing mate-screensaver-command --lock followed by systemctl suspend. By locking the screen first, before suspending, the screen is already locked when the computer wakes up. The same behavior happens when I close the laptop lid.
As far as I can tell, there is no option in either the Screensaver Preferences dialog or the Power Management dialog to specify that the screen should be locked whenever the computer suspends. That seems to be an oversight.
After some more investigation, I found that one way to track down the cause of screen locking issues is to take advantage of the mate-screensaver --debug option. Open a terminal window and type the command:
mate-screensaver-command --exit
This will force the screensaver to shutdown gracefully. Then execute the command:
mate-screensaver --debug
Then do whatever activity is causing your problem. For example, close the laptop lid, wait for the power light to slow-blink, then open the laptop lid. Then examine the debug messages that mate-screensaver printed in the terminal window.
If your method of getting around the lock screen problem involves starting a new session, then you may need to redirect the debug output to a file so that it's still around for you to examine:
mate-screensaver --debug > screensaver-log.txt
Here's the sticky widget: Any screensaver (not just MATE) cannot guarantee that the screen is locked if any other process can see input events. This makes sense, when you think about it. If the screensaver doesn't have exclusive access to input events, then a malicious person would, for example, be able to type a keyboard shortcut recognized by some running app and cause something illicit to happen.
The guiding principle is that only the screensaver process sees input events until the user types the correct password to unlock the screen.
So mate-screensaver achieves this, and I suspect all other screensavers do so too, by requesting the Xserver to grant it exclusive access to all inputs. In Xserver jargon this is called a "grab."
In my case, I examined the screensaver's debug output and found that the reason mate-screensaver was not locking immediately was that it was unable to grab some input sources. I pored through my script and realized that I had a subshell running a command that continuously monitored all inputs. Mea culpa. I rewrote the script so the command ran periodically rather than continuously, so mate-screensaver was able to grab those input sources in between invocations of that command.
Your problem with the keyboard being dead when the lock screen sounds suspiciously like an attempt to grab the keyboard inputs has been somehow bungled, perhaps by interaction with some process you have running at the time the screensaver tries to lock. I'm just guessing.
Anyway, if you're willing to try, please execute the commands above, grab the screensaver's debug output, and share it here. We'll try to help if we can.
"Sorry this letter is so long, but I didn't have time to make it shorter." --- Blaise Pascal