After upgrading our site from 3.9 to 4.6 we had an issue with our site crashing when we installed plugins, the plugins.json file was not updating etc after completing the entry to install the plugin.
After much investigation, the cause of the problem was the account for the built-in system record used for background tasks had been deleted.
Then after a lot more digging around I noticed If I click in scheduled tasks - "Delete inactive customers (GDPR)" it deletes the customer record for the built-in search engine.
I have tried it three times and it definitely does delete the account.
I have disabled this for now. Does anyone know how can this be fixed?