this question is so vague nobody can answer it
there is no special food that magically helps you keep gains, i would have to look at your entire diet and know exactly what kind of 'gains' you are referring to. if you put on a bunch of water off your cycle, which is probably what happened why would you want to keep sloppy gains?