edge developer tool console log Scripts may close only the windows that were opened by them.
If the script didn't start opening the window (something like window.open), then the script in that window seems to have been changed to a security that prevents websites that can't close the window take control of the browser and close the window.
window.open('your current page URL', '_self', '');
edge browser not close.
Thanks for letting me know the part.
Please inquire above.