I'll let some of the more experienced guys reply at more length. But from what I understand, if you are loosing altitude just as you are cruising (left, right, forward, back), it is more than likely not related to gains. The gains control the responsiveness of the system to the pilot's commands, or the ending of those commands.
I have read three causes for loss of altitude:
1) Imbalance of the aircraft... i.e. too much left/right weight, or, in your case forward or aft weight.
2) Improper configuration of the WKM to your transmitter... i.e. controls in detent (centered) are not registered with the WKM as exactly centered. I read that you have to ensure that when running your calibration, the controls need to end at 50 to register the detent position.
3) There is a known issue with the IMU. This is the one that has a lot of operators very upset right now because there appears to be a design flaw in the IMU, and/or its installation position on the S800. For that, DJI has issued a new V2 IMU that will become available shortly for all users, but there is an upgrade cost (which is what is making a lot of current users upset... why do we have to pay for a fix to a flaw in the design).
Like I said, I hope some of the more experienced operators will chime in, but the above is what I have experienced, and/or read as causes for loss of altitude.