Funny that predictive text seems to be more advanced in this instance but I suppose this is one of those scenarios that you want to make sure you get right.
There's something really depressing about an AI telling a suicidal person they're not alone and referring them to the vague notion of "national resources" or "a helpline"
A real answer to your question though, as long as you can get it to reconnect, even if you have to close the window first, it should still have your changes to the file ready to save. These will be cached (somewhere?) unless you close the file.