Earlier quoted context omitted.
The literal clock speed of CPUs has been stalling, but CPU performance is and has been on a massive increasing trend effectively ever since AMD released the first Ryzen CPUs. Recent product announcements from Intel and AMD show no sign of slowing down. Sure it's not the 'double performance in 1-2 generations' of the olden days, but it's definitely not stalled either.
One of the reasons why CPUs are getting faster is because the more transistors you have, the faster is the chip and vice versa (this is not a proven statement but rather my intuition). We might not be able to use higher clock frequency, but we still can fit more transistors on the same area.
If the gates path reaches its end, we can still go back to clock. It won’t be easy or cheap to solve all the clock problems, but if it’s better than the alternative someone will do it (like how fracking only became viable as a means of drilling oil once the cheap, easy to get oil was somewhat depleted)