Whether you disconnect, leave, get kicked, or banned for that matter of fact, before going to the main menu, the ReplayMod automatically goes through the process of saving the replay. The only times it wouldn't save, is if you Force Quit Minecraft during your recording.
As for your issue, you need to elaborate your issue alot more. What do you mean by Restart or Kicks? Server Restarts or Server Kicks? I will look into different sorts of leaves and see which ones do not save the Replay, until then maybe CrushedPixel will be able to help out, however this one line description will most likely not fix anything.