Platformio.ini question

with this config

[env:Nomad_BMS_ESP32-S3-WROOM-1-N4R2]
platform = espressif32@6.5.0 ; esp-idf v5.1.2
board = Nomad_BMS_ESP32-S3-WROOM-1-N4R2
framework = espidf
monitor_speed = 115200
monitor_filters =
    direct
    esp32_exception_decoder
build_type = debug
build_flags = 
    -D NOMAD_FIRMWARE_VERSION_MAJOR=0
    -D NOMAD_FIRMWARE_VERSION_MINOR=47
extra_scripts = post:make_uf2.py

my project builds fine, but I want a production env, so I do:

[platformio]
default_envs = Nomad_BMS_ESP32-S3-WROOM-1-N4R2

[env:Nomad_BMS_ESP32-S3-WROOM-1-N4R2]
platform = espressif32@6.5.0 ; esp-idf v5.1.2
board = Nomad_BMS_ESP32-S3-WROOM-1-N4R2
framework = espidf
monitor_speed = 115200
monitor_filters =
    direct
    esp32_exception_decoder
build_type = debug
build_flags = 
    -D NOMAD_FIRMWARE_VERSION_MAJOR=0
    -D NOMAD_FIRMWARE_VERSION_MINOR=47
extra_scripts = post:make_uf2.py

[env:prod]
platform = espressif32@6.5.0 ; esp-idf v5.1.2
board = Nomad_BMS_ESP32-S3-WROOM-1-N4R2
framework = espidf
monitor_speed = 115200
build_type = release
build_flags = 
    -D NOMAD_FIRMWARE_VERSION_MAJOR=0
    -D NOMAD_FIRMWARE_VERSION_MINOR=47
extra_scripts = post:make_uf2.py

but when I run pio run -e prod I get the error src/ble.c:25:10: fatal error: esp_bt.h: No such file or directory. Inspecting the .pio/build directories, it has created a different directory structure for /prod

any help?
thanks

Does this topic offer any help?

HTH

Cheers,
Norm.