Display freezing with glxgears and glxheads (Possibly more) on RTX 3070

I’m running Arch Linux with an RTX 3070 founders edition card using the 470.74 driver on the linux-xanmod-cacule 5.14-9 kernel. What happens is when using the NVIDIA driver for OpenGL rendering, glxgears is able to open but while its running, dragging windows causes the display to completely freeze for a small time. Sometimes when closing glxgears it will cause the display to freeze up completely for around 4 seconds. Same issues happen with the glxheads command.

I did some testing and found that if I use software rendering for OpenGL, none of these issues occur. It also happens on EndeavourOS and Pop!_OS.

Output of glxinfo -B with NVIDIA as the driver:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 8192 MB
    Total available memory: 8192 MB
    Currently available dedicated video memory: 6236 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3070/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 470.74
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 470.74
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 470.74
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

I also attached the bug report log below:
nvidia-bug-report.log.gz (419.8 KB)