NB! It seems this console command is not compatible with CS2.
Command Profile

CL_DZ_PLAYAGAIN_AUTO_SPECTATE

CS:GO

This command, if enabled (set to 1), will make you automatically switch to spectator mode after pressing play again in Danger Zone. Default is 0 (disabled).

Syntax
cl_dz_playagain_auto_spectate [0 / 1]

Description

This command, if enabled (set to 1), will make you automatically switch to spectator mode after pressing play again in Danger Zone. Default is 0 (disabled).

How To Use cl_dz_playagain_auto_spectate

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter cl_dz_playagain_auto_spectate [0 / 1], replacing bracketed arguments with the value you want, then press Enter.

This legacy command is not currently listed as compatible with Counter-Strike 2.

Syntax And Arguments

cl_dz_playagain_auto_spectate [0 / 1]
0 / 1 Set to 0 to not automatically spectate after pressing play again in Danger Zone (default). Set to 1 to automatically switch to spectate when searching for another Danger Zone game.