Lets ignore wave groups for starters.
You are looking at a model of a steady gravitational free surface wave train of parallel waves.
We have equations for that. See pages 16 to 39. The feature of interest is a quantity called the dispersion relation. It is discussed on page 29. It establishes the relationship between wavelength (or wave number), frequency, depth, and gravity.
$\omega = g k *tanh(kH)$, $k$ is wave number, $H$ is depth.
So the celerity, or phase speed, is what is changing with depth all else being equal. This is a result of plugging the general solution of the wave equation back in to the kinematic boundary conditions. The physical explanation is that the particle motion implied by the velocity potential field varies with depth. For deep water, the particle orbitals are ever smaller circles as depth increases. For shallow water, the orbits are ellipses. These differently constrained motions resonate differently.
Now for wave groups.
Groups, or packets, can be regarded as the superposition of a continuous spectrum of waves from the above solution. The criteria is that they completely cancel out everywhere except for some bounded region. And within that region, they preserve certain features of the packet over time. So what you need to do is find the complete spectrum that does this. And of course the dispersion relation applies to each component in the spectrum. From the standpoint of understanding what is going on, the early attempts by Stokes, Rayleigh, and Osborne Reynolds considered two dispersive waves of infinitesimally different wavelength. That was in 1876-79, and it stuck for about a century, but it wasn't exactly the all singing, all dancing analysis that that was wanted, and it didn't treat the flux of the different energy components separately.
Slowly, a more satisfying derivation took shape. It is fully consistent with the linear wave mechanics described above. See the first eight pages in the link below. This uses a bit different representation of the wave mechanics, but it is the same model.
These results are consistent with the flux line diagrams, Figure 1, and quantify the net drift of kinetic
energy relative to the wave which is apparent in the diagrams, increasing with decrease in depth.
It is probably unnecessary to point out that these transport speeds do not correspond
to the group velocity. They are in fact exactly twice the so called group velocity in the
case of linear waves
For uniform waves, the so-called group speed does not therefore correspond to the
actual speed of transport of any of the energy components, but to a weighted average of
It is noteworthy that dispersion does not seem to play a direct role in defining transport speeds in
their relation to the phase speed of the wave. Rather, these speeds are finally a consequence of the
distribution of energy within the wave structure, [1.45].