Check the transmission fluid level and quality. If it is low, add trans oil. If the color is black and smells burnt, then you need to have the tranny repaired or replaced by a rebuilt one. Sometimes reprogramming the EGS (the transmission control module) helps, but usually, it does not. Another would be
to detach the battery ground for approximately 10 to 20 minutes to EGS faults and adaptations. If hte condition persists, then you really have a bad tranny.