That's a different story. If the speedo also doesn't work when the car doesn't shift, the output flange nut is loose.
With it loose the governor and speedo gear spin freely on the output shaft (they are not keyed they are held tight by the torquing of the output flange nut) and without governor spinning there will be no shifting.
Pull the driveshaft down and tighten the nut.
Bosch Master, ASE Master, L1
33 years MB technician