That has happened to me in the past, though I don't know why and thankfully it's not frequent.
I try to remember to select all the text in the Reply window and copy it to the clipboard so that if it happens again I can just paste it into the now blank reply.
For longer replies I compose them in Notepad first (temporarily saving them if necessary - eg if interrupted when Mrs AA sounds the dinner gong

) and then cut and paste them to the Reply window.
Haven't answered your question, sorry, but they're my workarounds.
Cheers
AA