One would think that at least a rewrite-from-scratch effort like Wayland would have come up with a solution.
Unfortunately the same problem also exists on other systems. Visual Studio even had to add a feature "Run build at low process priority" for the system to remain usable during builds:
I mean the end-user can always write the glue required to get the current running window get its process and mark that as the "high priority", but that's still working under the constraints of the regular scheduler.