Hello Vahid Ajalluian,
Welcome to Microsoft Q&A forum.
Based on your description, I'd say the issue is with the stack network decision in Windows 10 and 11 rather than ARP/DHCP issues. Before we proceed further, may I know if the ESP32 has access to internet while using as an AP? When you manually disconnect and reconnect, the priorities are stabilized and the connection remain on the Wi-fi.
In this case, please help me do a little check regarding this.
- Open PowerShell as administrator.
- Type Get-NetIPInterface | Sort-Object InterfaceMetric and press Enter.
- Please note if the Wifi and Ethernet metric change when you connect for the first time and after reconnecting.
- Type route print and press Enter before and after the drop will also helps.
I'm waiting for your reply.