It would sound that the script skips a frame completely if shooting the previous frame is not finished yet when the new frame is supposed to be shot. So, the solution is simply to only take, say 400 photos per hour. Or as an alternative, you can make sure a shot will not require more than 10 seconds in total darkness by limiting Tv to 10 s / 2 - SD write and imager reset time, i.e. somewhere around 3 seconds.
To get closer to 10 seconds with that frame rate, you would have to disable dark frame compensation (noise reduction that takes a second photo with the mechanical shutter closed) but you may not want that for image quality reasons.
If my memory serves, the sunset script that I've used (highly likely not the same version you're using, but surely related) doesn't skip frames like this, though). Don't know why yours does.