If you don't mind me asking, what type of camshaft is in the engine?
If it is a flat tappet, stock style cam, then my previous suggestion about cam timing won't apply. However, if you have a roller cam with the odd-fire style timing chain drive. You REALLY want to check the woodruff key.
How do I know? This exact same happened to me. I sheared the key, tore up the nose of the cam and the sprocket. I had the exact same problem with the cam sensor you describe. I tried resetting the sensor several times. The engine would barely run. I scratched my head a LONG time before I pulled the timing cover and timing chain.
The root cause of the problem was the location of the cam sensor drive gear on the cam. It was messing with the cam sensor and loosened up the screw that holds the little cup in the cam sensor to the shaft. Once the cup was loose, it backfired hard which sheared the cam key. (it also bend my throttle body shaft)
I ended up replacing the cam and fixing the drive gear location problem. I haven't had an issue like this since.
Dave