A federal judge in San Francisco has dismissed a lawsuit in which Tesla Inc shareholders accused the carmaker of misleading the public about the progress on production of its Model 3 vehicle.