I am creating a second window of my image with the Window > Arrange > New Window for... function.
Now i want to close the second window again without closing the first one, but everything i tried so far closes both windows.
app.activeDocument.close() // Closes both windows
Action > insert menu item : Close // Closes both windows
Weirdly enough an action calling the menu item "Close" behaves differently than if i click the Close button manually. Clicking the Close button manually only closes the second window instead of the whole file.