ESP32-S3 disconnect when upload the code

Hi everyone.
I have an issue that is very strange:

  • Board: esp32-s3 8MB flash and PSRAM, partition 8MB default with 3M OTA
    when I upload the firmware with a size <1.2MB the firmware download is successful but when the size goes around 1.5MB the board always disconnects when downloading the code (if the download is successful then when the device runs always gets an error about SHA-256 comparison failed).
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4204788a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x39c
load:0x403b6000,len:0x9a4
load:0x403ba000,len:0x2868
SHA-256 comparison failed:
Calculated: 9127e332554622857d5c753c9ffbb9862bfb72e81ded80db80617d5974000cec
Expected: 867c0d6cb8d08f5a22bebcb1e4a5d457c2700a1c6b76abeb4d778eadcc3446e2
Attempting to boot anyway...
entry 0x403b61c0

Thank you.