Wait for MUI select portal that have ID in react testing library?

I have a tests that randomly fail when run all tests. One of the test that is failing is using MUI select that open menu using React portal (probably). the DOM look like this:

<div role="presentation" id="menu-additionalLangs" class="MuiPopover-root MuiMenu-root MuiModal-root css-1sucic7">
    <div aria-hidden="true" class="MuiBackdrop-root MuiBackdrop-invisible MuiModal-backdrop css-esi9ax" style="opacity: 1; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"></div>
    <div tabindex="0" data-testid="sentinelStart"></div>
    <div class="MuiPaper-root MuiMenu-paper MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation8 MuiPopover-paper css-oapmtd" tabindex="-1" style="opacity: 1; transform: none; min-width: 576px; transition: opacity 452ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 301ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; top: 16px; left: 496px; transform-origin: 288px 831.656px;">
        <ul class="MuiList-root MuiList-padding MuiMenu-list css-r8u8y9" role="listbox" tabindex="-1" aria-labelledby=":rg:-label" style="padding-right: 0px; width: calc(100% + 0px);">
            <li class="MuiButtonBase-root MuiMenuItem-root MuiMenuItem-gutters MuiMenuItem-root MuiMenuItem-gutters css-1vs4a3w" tabindex="0" role="option" aria-selected="false" data-value="SQ">Albanian - SQ<span class="MuiTouchRipple-root css-w0pj6f"></span></li>

This is language list component. How can I select element with id menu-additionalLangs created by MUI select?

I can’ use contaienr.querySelector becase this is outside of the container of the component. I need to use screen but it doesns’t have findById.

The portal have role but this is what I want to remove from the code, becasue it’s probably why tests are randomly failing. findByRole is too slow when run all the tests.

See GitHub issue: Performance issue with the byRole query causing timeout errors

I have code like this:

    const additionalLangsOption = await screen.findByRole(
      "option",
      {
        name: "Croatian - HR",
      },
      { timeout: 10000 },
    );

That is failing randomly, becase of timeout.