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.

*   The default value is `true` in web environments and `false` in Node.js.
 * @property {boolean} [stopAtErrors] - Reject certain promises, e.g.
 *   `getOperatorList`, `getTextContent`, and `RenderTask`, when the associated
 *   PDF data cannot be successfully parsed, instead of attempting to recover
 *   whatever possible of the data. The default value is `false`.
 * @property {number} [maxImageSize] - The maximum allowed image size in total
 *   pixels, i.e. width * height. Images above this value will not be rendered.
 *   Use -1 for no limit, which is also the default value.
 * @property {boolean} [isEvalSupported] - Determines if we can evaluate strings
 *   as JavaScript. Primarily used to improve performance of font rendering, and
 *   when parsing PDF functions. The default value is `true`.
 * @property {boolean} [disableFontFace] - By default fonts are converted to
 *   OpenType fonts and loaded via the Font Loading API or `@font-face` rules.
 *   If disabled, fonts will be rendered using a built-in font renderer that
 *   constructs the glyphs with primitive path commands.
 *   The default value is `false` in web environments and `true` in Node.js.
 * @property {boolean} [fontExtraProperties] - Include additional properties,
 *   which are unused during rendering of PDF documents, when exporting the
 *   parsed font data from the worker-thread. This may be useful for debugging
 *   purposes (and backwards compatibility), but note that it will lead to
 *   increased memory usage. The default value is `false`.
 * @property {boolean} [enableXfa] - Render Xfa forms if any.
 *   The default value is `false`.
 * @property {HTMLDocument} [ownerDocument] - Specify an explicit document
 *   context to create elements with and to load resources, such as fonts,
 *   into. Defaults to the current document.
 * @property {boolean} [disableRange] - Disable range request loading of PDF
 *   files. When enabled, and if the server supports partial content requests,
 *   then the PDF will be fetched in chunks. The default value is `false`.
 * @property {boolean} [disableStream] - Disable streaming of PDF file data.