Attach (recommended) or Link to PDF file here:

Configuration:
- Web browser and its version: Firefox 95.0
- Operating system and its version: Windows 10
- PDF.js version: Whatever is shipped with Firefox 95.0
- Is a browser extension:

Steps to reproduce the problem:
1. Open file in Adobe Acrobat and get message that file is protected. Cannot change anything without password
2. Open file in Firefox 95.0. Allows free editing of form fields and on top the file can be saved.
3. Open the saved file from Firefox with Adobe Acrobat and you still get the password protected message but the values are changed!

Testfile
[testfile.pdf](https://github.com/mozilla/pdf.js/files/7692008/testfile.pdf)

What went wrong?
Firefox allows editing of protected PDF files!!!


* @property {number} [maxCanvasPixels] - The maximum supported canvas size in
 *   total pixels, i.e. width * height. Use -1 for no limit. The default value
 *   is 4096 * 4096 (16 mega-pixels).
 * @property {IL10n} l10n - Localization service.
 */
class PDFPageViewBuffer {
  
  #buf = new Set();
  #size = 0;
  constructor(size) {
    this.#size = size;
  }
  push(view) {
    const buf = this.#buf;
    if (buf.has(view)) {
      buf.delete(view); 
    }
    buf.add(view);
    if (buf.size > this.#size) {
      this.#destroyFirstView();
    }
  }
  /**
   * After calling resize, the size of the buffer will be `newSize`.
   * The optional parameter `idsToKeep` is, if present, a Set of page-ids to
   * push to the back of the buffer, delaying their destruction. The size of
   * `idsToKeep` has no impact on the final size of the buffer; if `idsToKeep`
   * is larger than `newSize`, some of those pages will be destroyed anyway.
   */
  resize(newSize, idsToKeep = null) {