I use Home Assistant in a docker container behind a Nginx reverse proxy which terminates the SSL connection (using a wildcard letsencrypt certificate). I use dnsmasq on the pihole to access the reverse proxy directly while on the home network so I can use the same URL on any network (my router doesn’t support NAT loopback/hairpinning). This works fine for literally all my self-hosted services like nextcloud, gitea, etc. It also works fine when accessing Home Assistant using the web browser.
However, when I try to access Home Assistant via the Android app, lose and don’t regain the connection as soon as I turn on the WiFi and connect to the home network. When I am using the web browser on the same phone, I have no issues.
I configured the URL of my Home Assistant instance in the app when I first logged in which is https://hass.mydomain.duckdns.org.
Does the companion app not use the system DNS server in Android?