OnLayoutExit runs if two windows have same name
Operating system version
Description of the issue
A layout is opened by a script with using a new window.
The layout has OnLayoutEnter and OnLayoutExit triggers
Both triggered scripts do some window animation.
When the window opens the first time it works fine.
If the window is left open and the button is clicked and the window opens again with the same name, the new window runs the OnLayoutExit trigger, but the window does not close (the on exit animation runs which looks strange, then the OnLayoutEnter runs.
renaming the window so the next time the button is clicked confirms that it is the duplicate window name makes the OnLayoutExit run on opening window.
Steps to reproduce the problem
have a layout with a button to open a second layout with a new window with a name.
have the second layout have OnLayoutEnter and OnLayoutExit triggers
click the button twice and use script debug to see that the OnLayoutExit trigger runs on opening the second time
OnLayoutExit trigger should only run when closing a window not when opening a window with the same name as another window.
OnLayoutExit trigger runs on opening and before OnLayoutEnter for a window with the same name as another window.
Exact text of any error message(s) that appear