I have figured out the problem and a possible solution.
My development environment consists of two J-Link devices connected to two MCUs
The code running on each MCU is the same. I debug one MCU at a time using the MCUxpresso 'Debug your project' Debug icon.
Below is the RTOS setting before starting the debug session
<stringAttribute key="com.nxp.mcuxpresso.segger.rtos" value="true;GDBServer/RTOSPlugin_FreeRTOS"/>
<stringAttribute key="com.nxp.mcuxpresso.segger.select" value="USB=174506020"/>
After the debug session is over the RTOS setting is
<stringAttribute key="com.nxp.mcuxpresso.segger.rtos" value="false;GDBServer/RTOSPlugin_FreeRTOS"/>
<stringAttribute key="com.nxp.mcuxpresso.segger.select" value="USB=174506019"/>
Note that the USB ID has changed.
Thus the USB ID for the J-Link and the RTOS plugin setting are paired.
I only had one debug session for both J-Link devices.
My 'fix' is the following:
I create two different Debug configurations, DebugA and DebugB, each specifying a different USB ID
and checking the RTOS plugin setting.
I can then select the specific debug session. I use the Eclipse 'debug' icon to select the debug session,
not using the MCUxpresso 'Debug your project' Debug icon.
The confusion was the 'Debug your project' Debug icon provides a select J-Link dialogue, but does not
maintain the RTOS plugin.
So...The solution to the original problem is to create two separate debug sessions and select
the appropriate one.
I should also change the port addresses as per https://mcuoneclipse.com/2016/04/12/debugging-multiple-nxp-boards-with-gdb-and-pe/
and https://mcuoneclipse.com/2014/01/07/debugging-the-same-project-multiple-times-in-parallel-with-eclip...
so I could have two GDB sessions.