Welcome to Android Central forums. As SpookDroid mentioned this is a known issue for FB but I had this problem with YouTube. If you want to know the details of where on YT see my blurb at the bottom. Anyway, if you're using GBoard I may have a work around that worked for me.
Open the keyboard, touch the 4 squares in the left corner and choose resize, the keyboard will change showing a resizable box around the keyboard. I went a little silly the first time and shrank the whole thing, top to bottom and side to side, but you just have to pull it down. For me it was shrinking it from top to bottom by about one key row of height. It does make the keyboard keys smaller, I swipe so I'm not pressing keys individually that often, it may take a little getting used to but this works for me. I also don't resize each time, I've adapted to the keyboard being smaller and actually kind of like it this way.
I suppose this would work with any keyboard that can be resized, but I've only tried with GBoard.
Almost forgot. For me I experience this problem when I search my YT history. For whatever reason when I would use the history search the textbox would just vanish, then I could type but could not backspace over characters or have any control over the cursor or what I was typing.