Scenarios like this happen when QBO times out, amigos-landscapi.
QuickBooks Online has a built-in feature called Automatic timeout. This prevents unauthorized users from gaining access to your QBO account when you're away from your PC. When this happens, the program will automatically close when inactive and will not save pending activities.
The time of inactivity is based from the time that you last clicked Save. So if you walked away from the computer for 20 minutes, you could be signed out when you get back. Because even if you only left for 20 minutes or less, it has been longer since you last saved a transaction.
If you're the Master Admin of the company file, you can set the company settings to keep you logged in for 3 hours. This is to avoid the program from closing unexpectedly and losing all your work.
But if you didn't leave QBO open for a while and this happened, then you can try out these steps:
Don't hesitate to get back to me if you need more help. Thanks for dropping by.