HA/ESP connection doesn't restore after brief network loss

I’m having an issue where my Olimex ESP32-POE-ISO fail to reconnect after they briefly lose wired network connectivity. I noticed this after a power outage where my switches went down and later came back up but none of my Olimex ESPs were connecting to HA. My other ESPs use WiFi and all recover without any issues. I later tested by doing a simple switch reboot and see the same behavior. Rebooting the ESP (either power cycling or through a web interface) restores the connection.

My HomeAssistant logs show:
WARNING <ESP_NAME>: Connection error occurred: [Errno 104] Connection reset by peer

The ESP console logs show:

12:42:03	[D]	[api:102]	Accepted 192.168.x.x
12:42:03	[W]	[api.connection:070]	192.168.x.x: Network unavailable, disconnecting

I’m using esp32-poe-iso as the board type (which seems correct based on the docs) and I’m seeing this whether I power them via PoE or USB.

I’ve searched online but not finding anything that might help. I was hoping that the reboot_timeout setting under api might help but it’s enabled by default (to 15min).

Any ideas?

Think I found the problem. The Olimex user manual had a link to a ESPHome sample that showed the framework as esp-idf, which I had not specified on mine, and default appears to be arduino. Once I changed that, I am not seeing any issues power-cycling the switch and the ESP connects to the HA API.