Hardware-accelerated GPU scheduling allows Windows to offload some work to the GPU, theoretically providing increased performance in some scenarios. For more details check out Microsoft's developer blog post on the topic: https://devblogs.microsoft.com/directx/hardware-accelerated-gpu-scheduling/
HAGS may cause performance issues and failures with OBS and hardware encoders. It is recommended to be disabled while using OBS to avoid stability issues.
From there, set "Hardware-accelerated GPU scheduling" to OFF, then reboot your computer.
From there, set "Hardware-accelerated GPU scheduling" to OFF, then reboot your computer.