From what I understand, on linux wayland makes it possible to do this properly but I'm not sure that any environment on top of it is doing it. I think it's in a "nice to have" holding pattern for them because there's still so much to do to getting a stable and usable desktop environment there to begin with.
I wrote a gtk program in Rust that did all its work in the wrong place. It locked up the ability to move ANY windows on the desktop for several seconds. That's a compositor design issue if ever there was one. Is that going to get fixed?
If it was an X11 app, there are several things that can cause that that are just unfixable, unfortunately (e.g. XLockDisplay). If it was a Wayland app, that sounds like a bug in the compositor. If you still have a repro case, please file it.