PlatformIO Have A BUG(SD Lib)

You’re explicitly selecting an older >5.0.0 compiler here? Pretty sure that’ll give you a 1.50401.210106 version, aka 5.4.1.

Have you tried

platform_packages =
  toolchain-gccarmnoneeabi@~1.90301.0

to grab a 9.3.1 toolchain? (per https://api.registry.platformio.org/v3/packages/platformio/tool/toolchain-gccarmnoneeabi)