I sent a message to you about this as well, but just in case somebody else is having this problem, I would like to share my experience with this problem. The vacuum slide on the carb is the problem if it is a stock carb. When you go over a whoop the slide moves causing your bike to cut out. I fixed the problem by installing a FCR carb.
Also, another person said their bike was still running after the key was turned off. It is a common problem due to the fan running when you shut the bike off.
Another problem you may encounter with a z400 is the reverse rev limit switch down by the shifter will make one cut out as well. I cut my wires and bypassed the switch to fix that problem.
I have had a z400 since 2003 and have encountered most problems associated with it. Hope this info is useful and if you have any more problems feel free to send me a message!
Steve