Nature and dogs abhor a vacuum. I have re-trained dogs' responses by substituting SOMETHING ELSE to do. (NO is a command neither man nor beast enjoys- we all plan to do our own thing FIRST, and THEN we'll obey, we think.)Assuming your dog already has basic training, take him on a leash and walk him by the road. When a car comes and he tenses in the instinct to chase, immediately say, SIT or DOWN, whichever you like. (I always have used DOWN for retraining.)
Reward him, whatever your method.
Do the same thing with him on a long lead. Then, when he's loose, if you plan to continue having him run loose. Do it first close up then at greater distances.
It works.
I have literally saved a dog's life by signalling DOWN when he was prepared to dash across the street to some children in front of a truck coming down the hill. Worth all the effort.