First and foremost, let’s see what’s happening and what causes the glitch. In most cases, users complained that Waze loses its GPS connection some 100 meters after they start driving. While many don’t notice, the whole thing happens when the mobile device automatically locks.
Theoretically, this is the moment when Waze loses the GPS connection. Unlocking the device brings things back to normal, but of course, this isn’t a convenient workaround by any means because you can’t just drive with the screen turned on.
According to this thread on Google’s forums, the problem is experienced only on Xiaomi phones, and given that Waze loses the GPS connection when the devices enter a locked state, it’s pretty clear it’s the operating system that shuts down the navigation app.
Actually, the whole shutting down takes place for battery optimization reasons, which means you need to configure Waze as an exception to allow the permanent GPS connection.
To do this, unlock your Xiaomi smartphone, go to settings, and look for the apps section. Open Waze, and in the Battery Saver menu, choose the No restrictions setting to make sure the Google-owned navigation app can work correctly all the time.
This seems to fix the problems for all Xiaomi phone owners struggling with Waze on Android Auto. If you own a device from another brand, just make sure you check the battery settings for the app.