While original opened for “on exit” function, I think this issue also applies in your case as well:
Let me ping some devs and see if we can get more eyes on this.