OTA not working after flashing a tasmota device

Good morning,

I have a device with an ESP32-S2 which worked under Tasmota.

When I tried to flash it via tasmota with Modern file it didn’t work but in legacy it did.

Now it works in ESPHome, I can see its logs for example but impossible to modify it via OTA.

After 2% I have ERROR Error sending data: [Errno 104] Connection reset by peer

Can you move it closer to the AP?

I tried but it doesn’t change anything

Did you tried entering safe mode and then do the OTA update? For me that (luckily) always worked