Is it a Mac Pro? That could be a driver issue or over heating. I had Radeon 280 in my Mac Pro 5,1 and got weird graphics in videos, but I was plugged in with DVI, went to HDMI, no problems... I would say cabling, then over heating...Would flashing red/green/white youtube videos be considered a GPU issue? Or OS Issue.
MY ISSUE:
SMC didn't fix, so I just shut him down for now. Have to wait for macOS 12.2...