I can understand the basic point you teacher is making. It's a pity these guidelines always have to be taken (or presented) so literally.
Yes, we would say "in my car" in preference to "by my car". We would say, "By car" rather than "in car". No we wouldn't say "by my car".
But consider the following:
"I came home in a taxi." (Which rule does this satisfy?).
"I came home in a car."; "I flew home; I drove home"; "I took a taxi home"
"I rode home on a horse/ferry/hovercrat";
I think that, instead of wondering whether your teacher is right or not, try to understand the points/he's making.
Student or Learner