PlatformIO V5.2.5 in VSCode V1.65.0 (Mac Universal).
I have three environments defined in platformio.ini.
The switch environment menu (to the right of the terminal button in the bottom status bar), only shows two of them.
Actually, clicking the menu displays a combo-box at the top of the window. That combo-box shows only two of the environments. Typing the name of the third environment into the combo-box’s text area has no effect.
Changing the order of the environments in platformio.ini has no effect.
It should be extends = env:featherM4Development here, but this still doesn’t cause the merge ( accumulation, of build_flags which you seem to want, let me slightly rewrite it.
Though in hindsight, it is unusual to declare “arduino” as a library, this will cause it to search for that in the https://registry.platformio.org/, and might grab a library which you don’t want. The framework (arduino) is always included via framework = arduino, no need for a library declaration thereof.