this sounds like one of the issues with the igpu on the 7040 series. much older linux kernels didnt suffer this iirc but its been around for a while now (kernel updates have been gradually making it less and less frequent on fedora at least)
do you know if it happens on x11 (assuming you dont have any software or config that requires wayland to work properly)?
some of the links that have come up during my troubleshooting of my own issues, in case its useful - apologies if any of these have already been posted in this thread:
description of my own issues
for reference, I am on Fedora 41 but have also used Fedora 40 and I remember experiencing the issues there too on some of the kernel-vanilla kernels I installed to get a newer kernel (because of a different issue with amd graphics cards - namely a performance regression that was patched in the newer kernels but wasnt in the kernel versions shipped by fedora 40 at the time) - it might have also occured on some of the later kernel versions shipped with fedora 40 but that was a while ago and ive forgotten exactly when the issue started happening. also ive used swaywm the entire time.
the issues are/were:
occasional bars of pink corruption in gpu-accelerated firefox + occasionally some other applications like vscode, less often konsole, often when scrolling in firefox or switching sway workspaces to one with vscode open that hasnt been rendered for a while - only seems to happen frequently with gray-black backgrounds - also now on sharepoint onenote i get the occasional vertical gray+white bars on most of the screen - also when using 4k 60fps displays off the igpu there is major graphics corruption turning the display into multicoloured static or covering most of it with the same static and translating the remaining visible bits of the image with tiling while static flickers over it (it is somewhat covered at minimum and more gets covered every so often as the image glitches and shifts the offset position), basically being unusable unless i turn the framerate or resolution down