I get this issue for a lot of different windows, not just the command prompt. For example starting Oracle Virtual Box.
Edition Windows 10 Enterprise
Version 22H2
Installed on 8/29/2023
OS build 19045.3570
Experience Windows Feature Experience Pack 1000.19052.1000.0
I have to disable and reboot to get rid of the issue.
I have two monitors connected to a DELL docking station.