Port switcher buggy

I have a project with multiple environments

When I click the port switcher icon and change port, this has no effect on the port used from Upload and Monitor until I use the environment switcher to change (or re-select the same) environment.

After changing (or reselecting the same) environment, the port change takes effect

Just changing the port via the port switcher has no immediate effect.

Is this a bug?

Im on PIO 6.1.13

Did you set a fixed port in your environment?
Please show the content of your platformio.ini.

No, this is with fixed ports turned off. I only have monitor_speed specified.

Example env with the issue, some values omitted for privacy

[env:myenv]
platform = espressif32
board = esp32-wroom-32e-n16
board_build.partitions = mytable.csv
build_type = debug
framework = arduino
board_build.filesystem = littlefs
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
build_flags = 
	-DFLAGS=here
extra_scripts = 
	pre:build/rename_binary.py
lib_deps = 
	libs here
lib_ldf_mode=deep
build_src_filter =
  +<stuff here>

It also seems that using a port set in the port switcher, when i Upload and Monitor for a 2nd time, on the first attempt it just reconnects the monitor. When I click Upload and Monitor again it complains the task is already running, rather than killing the old one and restarting it automatically, as happens when ive specified a port in platformio.ini