For autosync (including instant upload) to work apps must run in the background. If manual sync works but autosync does not, your device is probably kiling background apps. On devices from OnePlus you need to change some system settings.
Battery optimization: this is the so called “doze mode” which prevents certain tasks from running if your phone has been sitting idle for a while. Furthermore apps which users do not open for some days are considered unused and are suspended. This is certainly not good for background sync apps. You need to turn off doze mode. There is a section in the system settings Battery > Battery optimization. Find our apps there and change their battery optimization setting to Don’t optimize.
On the Battery optimization setting screen, tap on the three-dot menu icon, select Advanced optimization. Then turn off both Deep optimization (already off by default) and Sleep standby optimization.
OnePlus ignores autostart app flag. Apps are not automatically launched in the background when you turn on your phone. You need to manually launch them at least once. In older versions of OxygenOS (OnePlus flavor or Android) there is an option in the system settings to allow specific apps to autostart. Please use it if you can find such an option in your phone.
OnePlus kills background services if they are actively running for longer than a few seconds. That means our sync apps are killed in the middle of autosync operation if it takes longer than 5 seconds or so. Of course once killed, they cannot schedule any next autosync. You need to lock down apps to prevent them from being killed by the system. Open our apps. Switch to somewhere else. Tap on the device “Recents” buttons to display the Recent app list. There is a lock icon next to each app in the list. Tap on that icon to lock down the app.
On OnePlus devices with newer OxygenOS versions this Recent app list has a different design. The list is horizontal, not vertical. There is a three-dot icon at the top of each app, tapping on it reveals a menu with the “Lock” menu item.