Not sure if it's related to the Hyundai, but I had a similar issue with my Toyota Highlander. When I switched the car off and walked away, the radio came on all by itself. The reason I found out, is that my phone automatically connected its bluetooth when I was sat in a restaurant nearby.
It took me a while to find the problem, but it was related to a blocked sunroof drain. The passenger footwell had filled with water and some electrical connectors got wet causing the fault.
After clearing the blocked drain and drying it out, the problem was fixed. Modern sunroofs aren't water tight. They usually leak into a ledge beneath the opening and water is drained out through the pillars. If the drains are blocked, the car fills with water which can cause electrical gremlins.
I hate sunroofs. Stupid idea. Don't think I've ever opened mine. My car has AC after all, as do most these days. What's the point of a sunroof?
Kudos to you for figuring that one out.
Simple answer to the point of a sunroof…….or to a whole host of other add ons…..…….more profit.
Respectfully,
Playacaribe2