This might not match to the fact that WiFi in general seems to work and that the boards do connect to the network during setup but only fail to connect after reset/reboot.
As general information this is an important hint to know.
Hey, I have the same issue and may have found a solution that could work for you and maybe others too.
I have four ESP32 from DOREHA. Installed WLED on them and as soon as I closed the installer, the WiFi connection closed and my ESP32 opened its WLED-AP, instead of connection WiFi. When I opened the installer and just click on install and select the specific ESP32, it was connecting to my WiFI, but as soon as I closed the installer, it lost the connection again. My second though was, maybe the UART communication has to do something with that. So I tried that, but I could only see in the logs, that it was trying to connect to my WiFi and failed, after that it started the WLED-AP and retried the WiFi connection. So no luck there either.
After some fiddling around, I tried to connect my lab bench power supply to the VIN and GND pin from the ESP32 and tried to power it that way instead of using a USB cable, and it finally worked. Tried it with the other three ESP32’s, and it worked with them too.