In response to my previous post about this problem below:
WHEA-Logger Event 17 - PCI Express Root Port - Microsoft Community
I think I have the solution, and it has to do with PCI-E Native Power Management in the BIOS (for Asus Z790 motherboards). The problem goes away if you turn it off, but I don't want to turn it off.
If you want it on without coming up with these errors:
Set your NVIDIA GPU in the NVIDIA control panel (if it's PCI-E 4.0 or higher, like the 30 or 40 series) to prefer maximum performance.
Change your power plan in Windows 11 to high performance.
It seems that the Windows 11 power plan of balanced mode doesn't work correctly with recent high-performance hardware like the ROG Maximus Z790 series and NVIDIA GPUs using PCI-E 4.0 or higher.