Configuration:
- Web browser and its version: Firefox 104.0.2
- Operating system and its version: Windows 10
- PDF.js version: 2.16.105
- Is a browser extension: no

Steps to reproduce the problem:
1. Configure the worker using the workerPort

    E.g Using either importing the webpack.js (worker loader and webpack v4):
    import * as pdfjsLib from 'pdfjs-dist/webpack';
    
    Or with webpack 5 (worker loader deprecated):
    import * as pdfjsLib from 'pdfjs-dist/build/pdf';
    const pdfJsWorker = new Worker(new URL('pdfjs-dist/build/pdf.worker', import.meta.url));
    if (typeof window !== 'undefined' && 'Worker' in window) {
        pdfjsLib.GlobalWorkerOptions.workerPort = pdfJsWorker;
    }
    
    Then get the document (we have an endpoint called '/test' to download the pdf), setting the verbosity as an option:
    const options = {
         url: '/test',
         verbosity: 0,
    };
      
    const loadingTask = pdfjsLib.getDocument(options);

2. What is the expected behavior?

    For worker to respect logging level set when getting the document, no matter how the worker is initialized.
    
    We are using the webpack 5 method above.
    
    Fixed by posting a message to the worker:
    pdfJsWorker.postMessage({
                    sourceName: 'viewer',
                    targetName: 'worker',
                    action: 'configure',
                    data: {verbosity: 0},
                });

3. What went wrong?

    Warning's still appear in the console such as Undefined function 32
    
    After further digging, these are output from the worker, which still has verbosity as the default.
    
    Digging even further, found that the verbosity isn't updated on the worker if worker is initialized from the port - it is when initialized from src path.

}
    }
    intentState.streamReader
      .cancel(new AbortException(reason.message))
      .catch(() => {
        
      });
    intentState.streamReader = null;
    if (this._transport.destroyed) {
      return; 
    }
    
    
    for (const [curCacheKey, curIntentState] of this._intentStates) {
      if (curIntentState === intentState) {
        this._intentStates.delete(curCacheKey);
        break;
      }
    }
    
    this.cleanup();
  }
  /**
   * @type {Object} Returns page stats, if enabled; returns `null` otherwise.
   */
  get stats() {
    return this._stats;
  }
}
class LoopbackPort {