Game freezing in Crystalis (NES)

I am running Retroarch 1.22.2 on Windows 11 with an Xbox Series X controller. I am only having this issue in Crystalis for NES. I have tried all four NES cores. With all of them, when I press B, the game freezes. If I press B again it unfreezes and I can attack. It seems like B is somehow being mapped to Pause.

However, other NES games don’t have this issue, and neither do other systems. It only happens in Crystalis, and with all cores. So I can’t figure out what to change, since I don’t think there are per-game settings, as far as I know, only per-core. But like I said other games work those cores.