Google apps (Gmail, Maps, Play) don't work when on data connection (Android - Pocophone F1) lately and seemingly out of nowhere my phone has stopped updating Gmail when on data, even when I manually try to synch. Google Maps and Play also won't work, although everything else does, like Reddit or Chrome. When on WiFi, no problems whatsoever.

I am using a Xiaomi Pocophone F1, running MIUI Global 10.3.8 / Android 9 PKQ1.180729.001.

This has been going on for weeks. So far I have tried erasing the affected apps' cache to no avail, and removed my Google Account from my device. When I tried this last step and tried to sign back in, I got a message saying "There was a problem communicating with Google servers.", so it didn't help either.

Any help would be hugely appreciated as I feel like this is way beyond my capabilities!
I followed several online troubleshooting guides for similar problems but nothing worked. In the end, I had to resort to a factory reset, and that sure fixed it.