text: Title: [BUG] Error: Frame was detached
  Body: **SYSTEM INFO-**
  
  1. Patchright-  1.48.0.post0
  2. OS- Windows 11
  3. Browser- Chromium
  
  I have been working on Instagram data scraper bot, switched to patchright from playwright given it's promising undetection features. The bot's playwright scraping code has been tested successfully for long operations but with patchright it's unexpectedly closing context after few extractions.
  
  As usual the code is bulky, so will share only relevant parts. Feel free to ask for any relevant code snippets.
  
  Context initialisation code is-
  ```
  async def initialize_browser() -> tuple[Browser, BrowserContext]:
      # Ensure a user data directory exists for Patchright
      unique_user_data_dir = os.path.join(os.path.expanduser("~"), "Documents", "CustomChromeProfile")
      if not os.path.exists(unique_user_data_dir):
          os.makedirs(unique_user_data_dir)
      else:
          clear_old_data(unique_user_data_dir)
  
      logging.info(f"Using custom user data directory at: {unique_user_data_dir}")
      # Start Patchright's asynchronous context manager
      playwright = await async_playwright().start()
      
      # Launch a persistent context with recommended settings for undetectability
      context = await playwright.chromium.launch_persistent_context(
          user_data_dir=unique_user_data_dir,  # Path for persistent user data
          channel="chrome",             # Use Chrome for increased stealth
          headless=False,               # Use headless=False for more undetectable mode (change as needed)
          no_viewport=True,             # Disable viewport resizing for more natural behavior
          args=[
              "--window-size=1920,1080",
              
              "--disk-cache-size=500000000"
          ]
      )
  
      page = await context.new_page()
      logging.info("Custom Chrome profile initialized and page opened.")
  
      logging.info("Initialized Patchright Browser with persistent context and stealth mode enabled.")
  
      return context, page 
  ```
  **Expected**
  -Initialize the context with provided cookies
  -Open the main scrolling page in primary tab
  -Process collected post and profile links in a different tab
  
  **Actual**
  - It abruptly closes the context after 10-15 extraction
  - The terminal log's point towards frame detachment
  
  
  
  ```
  INFO:root:Total links collected so far: 36
  C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\site-packages\patchright\driver\package\lib\server\frames.js:606
      if (this.isDetached()) throw new Error('Frame was detached');
                                   ^
  
  Error: Frame was detached
      at Frame._context (C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\site-packages\patchright\driver\package\lib\server\frames.js:606:34)        
  
  Node.js v20.18.0
  Error encountered: Page.goto: Connection closed while reading from the driver
  ```
  Help me out with this issue !!! Thanks