It seems that the defects is with the that model of ESP32 boards rather than with Platformio. They also do not do auto boot also with arduino Preformatted textIDE. Changing the boards to the model below fixed the problem.
Adding 10u capacitor between EN and GND fixed the problem with the board that didn’t work. The board that did work already has that 10u capacitor onboard. I am surprise that this is the case considering how mature and ubiquitous is the ESP32.