I believe if you leave a tab open on the invoice / quotation entry screen there’s a little background ping that keeps your session alive. This was added about 1 year ago.
If you did have a work in progress invoice in the editor and you wanted to be sure it’s not going to be lost on save, you can open another tab in your browser and go to your login screen. It will either log you straight in (if the session is still active) or prompt you to enter credentials. Either way after doing that, saving the invoice will not causing any problems.