Help wiring occupancy sensor
You used the wrong clamp, so the grounding path is broken

The particular occupancy sensor you are using uses the rather ugly kludge of sending its operating current back "home" via the equipment ground, rather than the neutral.  This worked in the old setup because you were using a proper multi-barrel connector to bring the type AC cables into the box, which provided a grounding path back to the panel.

When you put the new box on, though, instead of reusing the old multi-barrel connector, you misused a NM-type clamp to clamp all the wires in.  As a result of this, the armor on the AC cables did not extend into the clamp, leaving the grounding path to this box broken, which is a serious safety issue atop the fact it broke your occupancy sensor.

What I would do is put a duplex (two barrel) AC/MC connector in the existing top center knockout and use it for the type AC cables, then move the NM clamp to the top right knockout in the box and run the NM in that way instead of trying and failing to cram all three cables into the same clamp.  It would also be a good idea, since you have neutral at the box, to use a sensor that can use it instead of relying on a hack: Lutron's MS-OPS6M2N-DV will do the trick here instead of the MS-OPS2 you are using right now.