Hi, I solved a similar problem by flashing the camera again. I downloaded the firmware located in: https://github.com/m5stack/esp32-cam-demo. To flash the camera I used this software https://www.espressif.com/sites/default/files/tools/flash_download_tools_v3.6.4.rar.
Once has been downloaded the tool it has 4 options, I used the option 3 and I configured the tool as show in the image:
I hope this helps you.