The vertical structure of debris disks provides clues about their dynamical evolution and the collision rate of the unseen planetesimals. Thanks to the ever-increasing angular resolution of contemporary instruments and facilities, we are beginning to constrain the scale height of a handful of debris disks, either at near-infrared or millimeter wavelengths. Nonetheless, this is often done for individual targets only. We present here the geometric modeling of eight disks close to edge-on, all observed with the same instrument (SPHERE) and using the same mode (dual-beam polarimetric imaging). Motivated by the presence of CO gas in two out of the eight disks, we then investigate the impact that gas can have on the scale height by performing N-body simulations including gas drag and collisions. We show that gas can quickly alter the dynamics of particles (both in the radial and vertical directions), otherwise governed by gravity and radiation pressure. We find that, in the presence of gas, particles smaller than a few tens of microns can efficiently settle toward the midplane at the same time as they migrate outward beyond the birth ring. For second generation gas (Mgas ≤ 0.1 M⊕), the vertical settling should be best observed in scattered light images compared to observations at millimeter wavelengths. But if the gas has a primordial origin (Mgas ≥ 1 M⊕), the disk will appear very flat both at near-infrared and sub-mm wavelengths. Finally, far beyond the birth ring, our results suggest that the surface brightness profile can be as shallow as ∼−2.25.