Local connection works only when connected to 5Ghz wifi, not with 2.4Ghz wifi

Hi, I’ve recently installed HA OS on a Raspberry Pi4 and set up a reverse proxy via Caddy. I can now access HA both remotely and when I’m connected to my home wifi. Problem is:
When I’m connected to my home wifi, I can access HA only when the device I’m using (usually my smartphone) is connected to 5Ghz wifi. When using the 2.4Ghz wifi I get “unable to connect” when I trying to access HA.

My modem has 2 wifis (2.4Ghz and 5Ghz) with the same SSID and band steering enabled.
The Raspberry is connected via wifi, since I don’t have physical access to the modem.
The modem is DVA-5592.

As a temporary workaround I set up the modem so that my smartphone is forced to connect to the 5Ghz wifi… But I’d like to understand why this is happening…

Some APs caan separate the WiFi networks, so they are not in the same segment.

Nevermind, I found the issue was my router. It is a DVA-5592, it has hairpinning capabilities but the function is buggy and also tends to assign the same local IP to devices connected on the same wifi. After posting the first message, I rebooted the PI and I wasn’t able to access HA neither with duckdns nor with local IP address. I reinstalled HA from scratch assigning static IPs to all my devices and now everything is working (regardless of 5Ghz or 2.4Ghz), except that if reboot the PI I have to disable/reenable my portforwarding rules from the router config page or it won’t work. I guess one need another router to make HA work reliably…