I had the same problem and may have just fixed it. It seems to be working. I'd be interested if others see it as a reliable fix.
After studying, it looked like the problem was that after some number of seconds (maybe 10-15), Outlook would auto-save a draft of whatever was being typed (the auto-save feature can't be turned off in the app). At least for me -- a Gmail user -- Outlook
was then immediately syncing the new draft back to Gmail. That caused the email I was typing to disappear (it actually was just moved to the drafts folder) and the keyboard to close.
The fix seems to be at the Gmail end, by making sure that Outlook and Gmail no longer sync the drafts folder. I went to Gmail through a web browser, opened Gmail settings (the gear icon in the upper right), went to the "Labels" tab, and for the System Label
called "Drafts," I unchecked the box that says "Show in IMAP." I think (although I'm not an expert) that this means the "Drafts" folder in the Outlook app is no longer syncing back to the Drafts folder in Gmail. As a result, although the Outlook app continues
to auto-save a draft of any email I'm typing within about 10 seconds, the act of auto-saving doesn't cause any syncing activity back to Gmail, and drafting the email isn't interrupted (and the keyboard doesn't spontaneously close).
Does this work for others? It's only been a few minutes, but it seems to work for me.
EDIT: It's slightly more complicated. Unchecking "Show in IMAP" for the Drafts folder on Gmail seems to break the sync between Gmail and Outlook and Gmail entirely. I wasn't getting any new mail in Outlook and sent mail from Outlook wasn't sending. But,
when I scrolled all the way down the Gmail settings (still in the "Labels" tab), I had a user generated label called, "[Gmail]/\Drafts." I don't know what app created that, but when I unchecked "Show in IMAP" for that, it seems to have fixed the problem in
Outlook and doesn't seem to otherwise break Outlook. So far . . .