This issue occurs because multiple versions of @types/react are installed. Run yarn why @types/react to check the installed versions. You can resolve this by using the resolutions field or specifying a fixed version in your package.json.
@types/react
yarn why @types/react
resolutions