I was just able to fix this problem. I'm on an M1 MacBook Air.
I upgraded to Monterey, but that didn't fix it. Then I installed Xcode 13, which uses iPhone 13 as the default phone for emulation, and it started working. I'm not sure if it was the Xcode upgrade or using the iPhone 13 that did the trick.