Usually all pages of a particular web application are belong to the same session. When you switch to another web page and leave external page, session is alive for some period, for example 20 minutes. If you open the external page again within this period, you use the same session.
It would be nice if it can send signals to web server to terminate the session when user leave the external link page.
External page can detect when it’s closed. If you can edit the scripts of the page, you can implement this.