2007 Rubicon 500 Shifting Issue

I have an 07 rubicon that has sporadic shifting issues. It has the hondamatic transmission. It will sometimes work in D1, D2,and esp fine. but eventually the gear indicator will soon begin to blink and it will stop shifting. Sometimes it will "find" its gear back and I can resume shifting normally. It seems to do better when the shift lever is in low. I also notice sometimes when in reverse it sputters out but will eventually even out and reverse normally. I have pulled the trouble code and returned a 6 which indicates the angle sensor. Are my symptoms indicative of a bad sensor? In my mind if the sensor was bad it wouldn’t shift at all unlike mine which seems to work 50% of the time.

Thanks in advance for the help