Attach (recommended) or Link to PDF file here: N/A

Configuration:
- Web browser and its version: N/A
- Operating system and its version: N/A
- PDF.js version: 4.0.303 [a3637e653]
- Is a browser extension: N/A

Steps to reproduce the problem:
1. Open https://mozilla.github.io/pdf.js/web/viewer.html#page=1
2. Enable InkEditing.
3. Draw something on *the first* page (but do *not* hit e.g. <kbd>Esc</kbd>).
4. Scroll down to the second page.
5. Draw something on *the second* page.
6. Disable InkEditing.
7. Re-enable InkEditing.
8. Select the drawing on *the second* page (works fine).
9. Scroll up to the first page.
10. Try to select the drawing on *the first* page.

What is the expected behavior? (add screenshot)
The drawing becomes selected.

What went wrong? (add screenshot)
You cannot select the previous drawing on *the first* page with the mouse. (Furthermore, if you enable FreeText- or Stamp-Editing instead you can still draw on the page.)

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): N/A

/cc @calixteman Can you please take a look?
Note that I *suspect* that this might be a regression, but I've unfortunately not had time to bisect yet.

editor.paths.push(path);
      let p0 = scaleFactor * (bezier[0] - padding);
      let p1 = scaleFactor * (bezier[1] - padding);
      for (let i = 2, ii = bezier.length; i < ii; i += 6) {
        const p10 = scaleFactor * (bezier[i] - padding);
        const p11 = scaleFactor * (bezier[i + 1] - padding);
        const p20 = scaleFactor * (bezier[i + 2] - padding);
        const p21 = scaleFactor * (bezier[i + 3] - padding);
        const p30 = scaleFactor * (bezier[i + 4] - padding);
        const p31 = scaleFactor * (bezier[i + 5] - padding);
        path.push([
          [p0, p1],
          [p10, p11],
          [p20, p21],
          [p30, p31],
        ]);
        p0 = p30;
        p1 = p31;
      }
      const path2D = this.#buildPath2D(path);
      editor.bezierPath2D.push(path2D);
    }
    const bbox = editor.#getBbox();
    editor.#baseWidth = Math.max(AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);
    editor.#baseHeight = Math.max(AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);
    editor.#setScaleFactor(width, height);
    return editor;
  }
  
  serialize() {