See this comment for context and example: #10058 (comment)
I think this only affects pyyaml and setuptools at the moment, as they are they only type-* packages installed during tests.
Can probably be fixed by specifying the --typeshed-path cli argument. Note that this would have to be done in pyright_test.py and all Github actions. I have not tested this potential solution myself yet, and I didn't feel like doing this right now, hence this issue to remember.