I have the Samsung Note 20 Ultra 5G and go through intermittent disconnecting of both the wireless and wired Android Auto. It's more prevalent with the wired and could be because I'm using cheap cables. I might have to try switching it and see if that helps.
Let me know if you find a fix. I had the hardest time getting Android Auto to with on my old phone. It always seems to go out in the middle of when I need it using Google maps.