Ideally, the browser will always warn you before discarding unsaved edits. But some browsers are better than others at this.
However, WikiTree defeats the mechanism. In certain situations, eg
1 - failed token check
2 - invalid date or wrong date format
3 - brackets in first name field
the server rejects the save, but it tells the browser that the save succeeded. Now, the browser thinks you have no unsaved edits and will cheerfully allow you to leave the page with your work unsaved. (Refreshing the page will also be a bad idea.)
The browser can handle a lost connection without losing edits. The problem here is that the left-over banner can lead you to think that your save has succeeded when the browser is still trying to connect.
Actually of course the "Changes saved" message achieves nothing at all after the first time, because you can't tell the difference between the new one and the old one. In reality, the indication of a save accepted or rejected is that you jump back to the top of the page.
In fact, if you hit the Save button when you're at the top of the page (easier in portrait mode), and the banner is already showing, there's no save-completion feedback at all. The page redraws exactly as it was before. You may see it redraw, but blink and you miss it.