ESPHome node stops announcing itself via mDNS

When my ESPHome node has been running for a while it shows as offline in the dashboard. However, everything keeps working on the HomeAsstiant side (i.e. sensors update normally).

When I run avahi-resolve --name esphome-node.local (or ping esphome-node.local) from either the server running the ESPHome docker container, or from my laptop connected to the same network it fails to resolve the host name.

Then I log into my router (Unifi Network / UDM Pro) which does see the host esphome-node online, and I tell the router to force it to reconnect, and suddenly the node shows up again in the ESPHome dashboard and can be discovered via avahi-resolve again until the next day.

Setting ESPHOME_DASHBOARD_USE_PING=true does not help. In fact it makes it worse, since with that environment variable set the dashboard no longer discovers the node immediately after reconnecting. Any idea what’s going on here? When I search the community it seems this workaround works for most people that experience nodes being shown offline in the dashboard.

Is it possible that I have too much going on on the node, causing the mDNS service to crash? I have 7 sensors on that node (ESP32), some with non-trivial filters. Any way to troubleshoot this?