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.

this._capability = createPromiseCapability();
    this._transport = null;
    this._worker = null;
    /**
     * Unique identifier for the document loading task.
     * @type {string}
     */
    this.docId = `d${PDFDocumentLoadingTask.#docId++}`;
    /**
     * Whether the loading task is destroyed or not.
     * @type {boolean}
     */
    this.destroyed = false;
    /**
     * Callback to request a password if a wrong or no password was provided.
     * The callback receives two parameters: a function that should be called
     * with the new password, and a reason (see {@link PasswordResponses}).
     * @type {function}
     */
    this.onPassword = null;
    /**
     * Callback to be able to monitor the loading progress of the PDF file
     * (necessary to implement e.g. a loading bar).
     * The callback receives an {@link OnProgressParameters} argument.
     * @type {function}
     */
    this.onProgress = null;
    /**
     * Callback for when an unsupported feature is used in the PDF document.
     * The callback receives an {@link UNSUPPORTED_FEATURES} argument.