When we initially introduced this, I wasn't able to find any place where connectModalOpen was exposed, so we patched RainbowKit to expose useModalState. The value of connectModalOpen there turns to false when the WalletConnect modal is opened, so we had to add some hacks for it to work correctly.
It looks like now RainbowKit exposes connectModalOpen to consumers of the library. On top of that, the value of this connectModalOpen actually does not turn to false when the WalletConnect modal opens, so it lets us simplify some of our logic and get rid of some hacks.
This also solves ENG-8043, which occurred because the timeout in the old hacky code could be exceeded.