Flickering in sway with 515.57 nvidia driver

After upgrading the NVIDIA open source driver to version 515.57, I started seeing flickering. I even reinstalled Arch Linux but that didn’t help. GSP firmware is loaded (nvidia-smi -q | grep GSP). This is strange, because on 515.48.07 sway worked perfectly, there were no flickering.

Reference: https://www.reddit.com/r/swaywm/comments/vqehiq/flickering_in_sway_with_51557_nvidia_driver/