Running weird

So at some point the rpm will catch up and meet with the speed. When I drive, around 60mph the rpm is at 3500. At 55mph it’s at 3000 rpm. At 45mph it’s at 2500 rpm. Etc.

Here’s a link to the video

It gives me a p0171 code. Which means oxygen bank 1 too lean. But could it have a faulty transmission?

Ford focus 2010 automatic transmission

It seems that the PCM will not allow high gear due to the engine malfunction. Correct the oxygen failure before replacing the transmission.