This was a mess of a debugging that took almost a year of occasional trial and error and patience and endurance.
My problem was that watching YouTube videos would make my screen glitch out. Because the checkerboarding happened when my CPU temps maxed out in my mini-pc, I assumed that would be the reason. CoolerControl, and later on, a router cooler, both worked together to stabilize my temps in casual usage. A small hum in the background to replace random fan shrieking and my mini pc being ground to a halt for no reason.
None of these solutions worked out. Well, YouTube and Twitch was fairly stable in Chrome, but the issue still has not fully disappeared.
I've also been reading about how new devices are better off running on near cutting-edge Linux Kernels rather than stable but old versions to take advantage of better hardware compatibility. I saw the benefit of this when upgrading my Linux Mint version, and getting the benefit of AMD P-States.
So using Mainline, I took the risk of running Kernel 6.12 on my Linux Mint. With the risk that future Mint Updates might break my system, I found that 6.12 was solid. I don't know if it is only me, but the Linux graphical experience is a little less quirky and a little more smooth for 6.12 than for the older 6.8.
But it did not solve my problem. But it felt like it got worse. It was not just web videos. But web apps.
Looking into this issue I found the following.
One: AMD has or had problems with rendering web apps causing checkerboarding. However, these posts were years ago; and the advanced browser settings they suggested as solutions, related to advanced render settings, are no longer present.
I reasoned that this issue is relevant because.. I began adding a couple of laptops to my arsenal, and found that none of them, not even the dual-core Chromebook with Linux Mint installed over it, struggled from the same issues my mini-pc had. All of them ran Intel. None ran AMD, except for my Mini-PC.
Two: AMD has or had problems with checkerboarding displays in general. These posts were around 2015s more or less. And one of the solutions I've noticed is changing the window manager.
And here is where I realized something. In my old ancient Acer Aspire, my first 16gb ram secondhand monster with a 2-core 4-thread i3, I suffered from screen tearing with watching videos. I solved that screen tearing by going to Desktop Manager >> Window Manager, then trial some options there other than your current window manager. In my case, Compton helped with my screen tearing issues. And Compton also had settings that allowed you to change overall window transparency, a setting that never really carried on to my future setups.
And using XFWM4 + Compton instead of the default XFWM4, surprisingly enough, resolved my issue with the web app display checkerboarding. The checkerboarding was a grave eyesore when it happened. And now, it literally just disappeared, like it never existed.
I hope this solves your display checkboarding issues with your YouTube watching and Electron web apps in Linux as well.
Edit (2025/01/14): While Compton is smooth for most cases of YouTube watching, I found a weird glitch where some UI interactions perhaps, especially while watching videos, can hang and crash the YouTube tab. This was a one-off occurrence in Firefox for now. I thought my computer would shut down when it hang but at least in this case only the YouTube tab broke down. I think when this happened, I was switching from video watching to shorts?
Edit (2025/03/11): You should probably use picom, if you can. While Compton is solid for casual video watching, it causes quirks and breaks when it comes to gaming (Skyrim in my case). Compton is also no longer being actively developed for a decade. Picom is the spiritual successor of Compton. And as it so happens, it also behaves properly for both gaming and video watching, if you are able to set it up properly. I use the config file included in this Arch forum discussion, but added the solution config later on in the same site. And yes, you need a config file first before you can guarantee yourself free from almost any screen tearing on Linux Mint XFCE. Though be warned; YouTube Shorts can still force Picom to hang up and restart.