Hello!
I have the same problem. I just very recently upgraded to Pie and am having the same problem. Keyboard appears after unlock. For me, though, the keyboard instantly disappears after a half second or so; but it still appears, is annoying, and shouldn't happen.
I notice that the problem does not happen after a restart. So far, the only way I have been able to reproduce the bug is by unlocking the phone to a screen that requires a keyboard (chat screens with text boxes, password screens, etc.). On subsequent unlocks, the keyboard would appear again and again.
This happens even in Safe Mode.
Steps to reproduce the bug:
1. Get to home screen
2. Choose any app that requires text input, prompting the keyboard to open
3. Lock the screen
4. Unlock the screen
5. Close the app or do anything else
6. Lock-unlock the screen, and the keyboard will pop up for a half-second or so
Thank you