VEX Cortex has two CPUs. A master CPU which manages competition status, controls all the Wi-Fi, and has override to enable/disable all motors. The "slave" CPU runs the user programs and the ROBOTC firmware.
The master firmware has two modes for motor operation when using Wi-Fi. These are set by the "Competition Control" menu on the "Robot" menu within ROBOTC.
The states are:
- No Wi-Fi used. Direct USB A-to-A cable between robot and PC. Motors are always enabled.
- Wi-Fi used for competition. I believe motors will be disabled if the Wi-Fi drops for longer than a brief interval.
- Wi-Fi but not used for competition. Motors are always enabled regardless of Wi-FI state.
It sounds like you're set up for the 3rd state. You probably want to configure for the second state (even though you're not using it for a competition) to get the behavior you want.
There's a more complicated answer where your program would need to check the internal state of the Wi-Fi link and then manage the motor enable / disable within your program. I cannot remember whether the "internal state" variable is visible, on a read only basis, to user programs but I believe it is but probably not documented.