Happens to me too in on outlook.office.com. This is such a bad bug, and I cant believe it has survived for this long.
This is definitely related to the keyboard shortcuts, because
Turning off keyboard shortcuts in the outlook.com settings, and the problem goes away.
It also looks related to the Text Predictions.. that thing that suggest words or phrases as I type. If I type a sentence that creates a prediction, like "What are the next", it will suggest "steps". When I press the space, "s" and "t" keys (starting to type " steps"), they sometimes don't appear. Then when I press the "e" in "stEps" the message is archived, since "e" is the shortcut for archiving.
What's interesting is that this behavior happens even if I disable "Text Predictions" in the settings. If I type the same sentence, it still happens at the same place in the sentence where the prediction would be if the setting was on, as if the prediction was made and simply not shown, but still producing the bug of triggering the archive shortcut.