Update esptool.py to version 3.1 Add to your config
platform_packages = platformio/tool-esptoolpy @ ~1.30100