Configuration error with setting SOC_NRF52840=y in west standalone, works in vscode

I can build my project fine with the vscode extension, but when I copy the `west build ...` command from vscode and run it from CLI, i get an error about how the SOC option isn't directly configurable:

```
~/my-workspace> west build --build-dir /home/k/proj/nrf_tab/rev5_build_tmp2 /home/k/proj/nrf_tab --pristine --board rev5 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/home/k/proj/nrf_tab -DCACHED_CONF_FILE=/home/k/proj/nrf_tab/prj.conf -DDTC_OVERLAY_FILE=/home/k/proj/nrf_tab/app.overlay
> -- west build: making build dir /home/k/proj/nrf_tab/rev5_build_tmp2 pristine
> ...
> ...
> error: SOC_NRF52840 (defined at soc/nordic/nrf52/Kconfig.soc:35, soc/nordic/nrf52/Kconfig:27) is
> assigned in a configuration file, but is not directly user-configurable (has no prompt). It gets its
> value indirectly from other symbols.
```
full output: https://pastebin.com/38f9Tn2M

This stems from the inclusion of
```
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QFAA=y
```
in the `prj.conf` or `_defconfig`, which are required for nordic features like RTT, ie. `CONFIG_USE_SEGGER_RTT=y` seems to depend on setting the SOC series like I did. Am I doing this wrong? Why does this work in vscode but not here?
Full output from a successful build using vscode: https://pastebin.com/DY1TYcQR

More info about my configuration:
`rev5` is the name for that board layout. Since i have to develop for multiple revisions of this board with different pin layout assignments I use `rev5`, `rev6`, etc. for the different revisions of the PCB which use different pin layouts and have different features, though so far each `rev` uses the same `nrf52840` SOC so there's a lot of repeated configuration between each of the boards. I'm open to  criticism on the way this is set up.
```
   boards
  └  arm
    │  rev5
    │ │ * Kconfig.board
    │ │ * Kconfig.defconfig
    │ │  board.cmake
    │ │  board.yml
    │ │ * rev5.dts
    │ │  rev5.yaml
    │ └ * rev5_defconfig
    │  rev6
    │  rev7
    └  rev8
```
For contents of each config file in `rev5/` (in case its relevant), see https://pastebin.com/HbKJjBac

Would appreciate any advice thanks.

Related