At low idle or coasting in a parking lot the engine knocks and rattles as though it will die. The diagnostic said bank 2 needed a new position sensor. I did that, it fixed the issue for about 10 days.
My car has 120000 miles.
My car has an automatic transmission.
First I would make sure you replaced the cam sensor on the driver’s side of the engine. This is bank 2. Now you have a noise in the motor, and it is rattling and running rough. I would point you too a technical bulletin 14-0114 for the 5.4 3 valve motor. The bulletin calls for replacing both the left and right side variable cam timing solenoids in the valve covers on both sides of the engine. This should fix the problem for you.