This question already has an answer here:
If you are editing the text in the android app, then switch to another app, and return back to the app all the edits are lost.
This seems to happens when the OS kills the app after pausing in order to reclaim RAM in low memory conditions, but maybe there are other conditions too.
Apparently, the draft is not saved in
onPause, therefore as a result even an alarm which goes off, and is then discarded will lead to all edits being lost and replaced with the old text.
You'll probably need to add some handing to
onRestoreInstanceState, and make sure it is persisted to physical storage, so that it works even if the OS purged the app from memory.