I just tested this again on swaywm (recent git version), and it only fixes the issue the first time the minimize-to-tray action is performed. Once the floating tray icon is clicked and the window is restored, on subsequent attempts, the game window is no longer unmapped/hidden. It remains as an empty black window on screen (but the tray icon does show up again).
This is different from how this patch affects i3 (where I tested before), because on i3 it fixes the issue no matter how many times the minimization/restoration is done. Before the async request patches, the functionality worked identically on i3 and sway.
Sorry I didn't catch that earlier. It's still interesting, because it means that the outdated workaround/hack I pointed out in i3's source is not the only thing to blame here. I looked around for something like that in sway/wlroots' xwayland interop and couldn't find anything as suspicious like that.