My screen is sometimes/randomly flashing (during few seconds) when I switch to another window, or click.
I am using Fedora 34 (kernel 5.12.14-300) with Gnome 40, so I don’t know if the problem is related to my configuration or if other people have the same issue.
Edit:
I just read that Gnome 40 came with GTK 4 so it may be the cause.