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.

*   per range request. The default value is {@link DEFAULT_RANGE_CHUNK_SIZE}.
 * @property {PDFWorker} [worker] - The worker that will be used for loading and
 *   parsing the PDF data.
 * @property {number} [verbosity] - Controls the logging level; the constants
 *   from {@link VerbosityLevel} should be used.
 * @property {string} [docBaseUrl] - The base URL of the document, used when
 *   attempting to recover valid absolute URLs for annotations, and outline
 *   items, that (incorrectly) only specify relative URLs.
 * @property {string} [cMapUrl] - The URL where the predefined Adobe CMaps are
 *   located. Include the trailing slash.
 * @property {boolean} [cMapPacked] - Specifies if the Adobe CMaps are binary
 *   packed or not.
 * @property {Object} [CMapReaderFactory] - The factory that will be used when
 *   reading built-in CMap files. Providing a custom factory is useful for
 *   environments without Fetch API or `XMLHttpRequest` support, such as
 *   Node.js. The default value is {DOMCMapReaderFactory}.
 * @property {boolean} [useSystemFonts] - When `true`, fonts that aren't
 *   embedded in the PDF document will fallback to a system font.
 *   The default value is `true` in web environments and `false` in Node.js;
 *   unless `disableFontFace === true` in which case this defaults to `false`
 *   regardless of the environment (to prevent completely broken fonts).
 * @property {string} [standardFontDataUrl] - The URL where the standard font
 *   files are located. Include the trailing slash.
 * @property {Object} [StandardFontDataFactory] - The factory that will be used
 *   when reading the standard font files. Providing a custom factory is useful
 *   for environments without Fetch API or `XMLHttpRequest` support, such as
 *   Node.js. The default value is {DOMStandardFontDataFactory}.
 * @property {boolean} [useWorkerFetch] - Enable using the Fetch API in the
 *   worker-thread when reading CMap and standard font files. When `true`,
 *   the `CMapReaderFactory` and `StandardFontDataFactory` options are ignored.