One way to disable the Game DVR from the command line is by using REG.EXE at an elevated command prompt like this:
reg.exe add "HKLM\Software\Policies\Microsoft\Windows\GameDVR" /v "AllowGameDVR" /t REG_DWORD /d 0
If you want to overwrite any previous value, add /f at the end of this command to force the change without prompting.
Explanation:
Microsoft group policy documentation at https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-csp-applicationmanagement#applicationmanagement-allowgamedvr
Says that this policy is found in C:\Windows\PolicyDefinitions\GameDVR.admx
On my Windows 10 21H2 the policy looks like this:
<policy name="AllowGameDVR" class="Machine"
displayName="$(string.GameDVRMode)"
explainText="$(string.GameDVRMode_Help)"
key="Software\Policies\Microsoft\Windows\GameDVR"
valueName="AllowGameDVR">
<parentCategory ref="GAMEDVR" />
<supportedOn ref="windows:SUPPORTED_Windows_10_0_NOSERVER" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
It is policy class Machine so it is in the HKEY_LOCAL_MACHINE or HKLM registry hive.
The registry path is Software\Policies\Microsoft\Windows\GameDVR
To disable it, you create the key name AllowGameDVR with a decimal value (or DWORD) of 0