There’s already a bug report here: https://forum.inaturalist.org/t/failed-to-save-comment/18941
I’ve always assumed it’s that either some page specific token has expired, or that the real state of the page has changed relative to what is currently shown in the browser window you’re submitting from. So I just as force of habit always keep a local copy of whatever I’m about to submit until it’s successfully submitted - but agree it would be nice to handle this better. There are certain challenges with any system allowing people to update records in parallel, their changes don’t always merge cleanly together ‘automatically’.
I think if it’s possible to warn you of a problem before the problem occurs then it’s also possible to just avoid the problem and do something that makes it not occur - so I don’t think the suggested ‘feature request’ here (to add a timeout warning) is the best answer, but I’d support making this a wakeup call on the bug report to implement better behaviour in this case.