Playing tanks in general should be done in the mindset that you should not lose a single unit.
Kodachi is very fast. Only Darts, Fleas, Scrubbers and to some extent Glaives can catch it. With perfect micro and good decision making you should not lose Kodachis to anything but those raiders and/or ticks and roaches. You can always retreat and regenerate health.
Panther can be played in similar ways as it is even faster and got more health. However it doesn't have health generation so every damage it takes is increases the risk of losing it unless you go back and repair. With the stun, fast units have even greater trouble chasing it down or intercepting it as they lose their speed once EMPed. It can however be hard to finish of enemies with a Panther in such situations and damaged Glaives are soon fully healthy Glaives.
Once you field a few kodachis and/or Panthers you should consider making Banishers or Reapers. With some support you can prevent Raiders from chasing down a low health Reaper while the Reaper can run over Ticks and Roaches without much hesitation. Banishers also benefit from support to prevent them being overrun by spam.