As I understand it, this is a current limitation of Wayland. For KDE, which is what I use, they'll be writing something too handle this since it's not possible natively.
It is possible natively. The logic, however, needs to be implemented in the compositor not the applications, because it's the compositor that keeps track of the positions of the windows.