Hello i am Dimitar from Shelly Team.
I can't answer your questions here frequently, so many parallel channels:
From where coming disconnecting issue:
ESP lost IP during the DHCP release, it's coming from the ESP SDK.
What we do with this fix: We looking for the IP address and if device can't get it in 30 seconds we restart the network.
This is the temporary fix before find a way to resolve it - maybe with next ESP SDK release.
If you have network monitor you can see short disconnects, but most important is that device coming back shortly.
The only way which we know now is to set fixed IP address on the device (Not in the router) outside of the DHCP range. Fixed IP on the device resolve DHCP issue in 99.99% of cases.
Another possible cases is bad Wi-Fi coverage or Router issues.