From a quick search it seems that pageIDs stay active until the session associated with that tab times out.
EDIT: the timeout duration is 60 seconds to be exact, at least as of late 2022:
See also the following: the pageID is associated with the tab, not a view, which sounds like a good thing in your case.