"No SIM Card" after flashing custom ROM (Oneplus 7 Pro)


I have an unlocked Oneplus 7 Pro that I just installed Havoc OS on, which stopped the SIM card from being recognized. This SIM card works on both other phones (stock Pixel 2) and this phone with a stock ROM. The phone still has its two IMEI numbers. I’ve looked at quite a few options to fix this, such as:

  • Rebooting the phone multiple times
  • Clearing Dalvik/Cache
  • Resetting all network settings in Settings > System > Reset options
  • Reflashing the ROM and TWRP multiple times to make sure they are in both slots
  • Trying dial codes *#*#72786#*#* and *#*#4636#*#* (both cleared the input but nothing happened afterwards, no menus or popups)
  • Taking out the sim, putting it in airplane mode, putting the sim back in, powering off, waiting a minute, and putting it back in
  • The device was sim unlocked before flashing the ROM