The source project of this merge request has been removed.
Fix KeepOpen=false on Wayland using QGuiApplication::focusWindowChanged
This fixes 380497.
I'm aware that this is almost certainly not implemented correctly, as I have essentially no experience with C++ and Qt at all, and this is the result of a bit of experimenting and googling.
But hey, it fixes the problem, and maybe someone who knows this stuff can correctly implement a fix based on this.