OP here. I wanted to update this thread with my ultimate solution to my OEM SRAM SX 12-speed shifting problem on my 2021 Specialized Rockhopper Expert:
I ordered a Shimano SLX derailleur and shifter from Singapore on e-bay (they took over 2 months to arrive), installed them on my bike, and now the bike shifts perfectly with the Shimano SLX derailleur & shifter and SRAM SX cassette. I was worried about mixing vendors like this, but it worked perfectly.
I still can't peddle backwards in my granny-gear without the chain falling off, but I wasn't expecting a derailleur to fix that. I think my lesson-learned here is to avoid bikes with bottom-tier 12-speed drivetrains. The SRAM SX derailleur & shifter I removed look pristine. I guess the manufacturing tolerances just weren't up-to-snuff for 12-speed shifting. It does have a lot of plastic in it.