Your approach looks correct, maybe you just need to lower the available torque for higher gears so that the car can't overcome friction in that case. If that does not work you could fake it by checking the current velocity and if it is below a certain value prevent the shift into a higher gear (or shift into a higher gear but clip the maximum velocity).