However, version 4 brings many major changes to the toolset, the libraries and the build system, and they haven’t been integrated into PlatfomrIO yet. So building the code will probably fail miserably with no easy workaround.
Yet
As far as I know, it’s because v4 is still beta, and PlatformIO devs decided to wait for stable versions of frameworks. This applies not only to Espressif.