After option flash size auto detect you have parameter size/address set to 0x400000. Probably this number is treat as address to write wifi.bin at end last byte of flash memory (dont fit in flash from this address, write beyound flash). Try burn firmware without settings a wifi credentials, or don't set flash size if auto detect size option is set. Eventually manually run esptool in command line with correct parameters.