Solution found!!
In case your Android Auto randomly disconnects after 5-25 minutes of driving. Possibly you have issue with too many sound alerts/notifications disrupting USB.
In my Case:
When "drive assist" notifications are set to "sound & visual" - after some beeping my Android phone (connected via USB) - gets disconnected.
Fix:
When I switch Sound Notifications OFF - then no disconnections happen.
(Tested after hours of driving)
Reason:
Beeping sounds (car alerts) - override sound coming from USB connected Android phone.
When too many beeping happen at once (eg speed limit, or car in the blind spot) - USB connection gets disrupted.
I didn't debug USB connection itself, but I'm certain that enabling trace can show the problem.
(Didn't had time to debug).
What I've tried and didn't help:
- Updated Multimedia system
- Used like 8 usb cables including USB 3.0 Gen 1.
- Switching off any battery optimization (on app level and phone level)
- Tried 2 other Android Auto devices (Motorola and AAwireless) - nothing worked.
- Switching my phone to Dev mode - and enabled "don't sleep when connected via USB"
My phone is Samsung Fold 5. But 2 other Android devices get disconnected too - so in this case it is not Android Auto but Lexus Software.
Hope this helps somebody with same issue.
P.S. I've submitted my findings to my Lexus dealer - so it could be registered as a bug with Lexus software team