Works OK on Linux, but not on macos or win32.
Fixed in r24557. Only happened when the window was closed using the window manager's "close" action, not the application keyboard shortcuts (ie: Escape key).
Will backport and look for other places where the same problem might be happening.
More found and changed to use the 'close-event': r24560.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2502