From my preliminary research, it looks like the issue occurs when a class subclasses two dict subclasses. I wrote some failing tests for the failure cases [here](https://github.com/python/mypy/pull/19076) and could now use some help figuring out where to go next.