Thanx for your reply Jaymer.
From what I can tell, there is no CLOSE WINDOW function.
There is a CLOSE TAB function but it seems like it only works if you use the Open In functionality. However, the DISPLAY LAYOUT is a different type of call to create the TAB. It does have the availability of providing an ID for the Tab but the Tooltip says it is only mused for Tours. Indeed when you inspect the opened Tab, you can see that the TAB ID is not there.