I had the same problem. What I think triggered it was I was using Google Keyboard. Then, later when I accessed Secure Folder (Google Keyboard was not installed in Secure Folder), the phone switch to Samsung Keyboard. I think something was left out of sync and I had the same problem you did.
What fixed it was: 1) installing Google Keyboard in Secure Folder and 2) restarting the phone.