Most results say no real difference. You are mostly GPU bound at 4K. Might be as much as 4% difference at 4K, but something like 25% difference at 1080p in FPS output.
Pretty much all 12th gen and Ryzen 5000 and up CPUs are adequate for 4K gaming when paired with an appropriate GPU, the spread will be pretty small between them in terms of FPS. The faster CPUs may gain you more consistent minimum FPS output and better frame times, which generally have more of an impact on gameplay feel than raw FPS.
265K or a 7800X3D would be my pick today. 9800X3D is somewhat reasonable, but you are paying an extra $80 or so for a few percent gain over the 7800X3D. The lower temperatures and higher potential of the 9800X3D are worth it if you like to tinker.