Neither. Both. Either one. The 9700k can get slightly higher fps at 1080p, barely better fps at 1440p and equitable fps at 4k.
But since the fps at 1080p is very high, there's no visual difference, only a difference in a benchmark.
In most newer AAA titles, you'll be gpu capped, not cpu capped, meaning any extra fps won't be used anyway.
Personally I'd not even look at the 9700k, it's about to get swapped out for 10th Gen cpus and for the same price or less than the 8 core I7-9700k, you'd be looking at 8core/16thread hyperthreaded cpus.
View: https://youtu.be/umaK8ter5WU
Go with whichever is cheaper overall after figuring motherboard and ram