closed property of child is becoming true even child is not closed in chrome

I am trying to listening to closed property of child in chrome but closed is becoming true even without closing the child tab. Below is the code I am using to achieve my task

    var child = window.open(
      "http://localhost:5001/auth/google",
      "",
      "location=yes,status=yes,width=1366,height=768"
    );
    setInterval(() => {
      console.log(child);
      if (child === null || child.closed) {
        clearInterval(clearTimeout);
        console.log("THE CHILD WINDOW HAS BEEN CLOSED");
      } else {
        console.log("OK");
      }
    }, 1000);