Its not really WikiTree's fault that your data was lost. The unsaved data only exist in your local browser window until you upload it back to WikiTree by saving. This form data is not saved anywhere until the user (or special hidden code either embedded within the page or your browser) initiates a "save".
So when your browser switches pages, the unsaved data in the previous page is then discarded. Its how most browsers work. (as Linda mentions, there are some browsers that are able to "save" the unsaved data by caching it locally)
Websites that require password authentication have to periodically refresh/request that auth information, which then forces a page switch when your current login session expires. And by default, the session is not very long.