Given a capacitor with large plates (area $A$) separated by a dielectric with relative permittivity $\varepsilon_r$ and thickness $g$, I believe the Maxwell stress tensor states that the force on each capacitor plate is: $$F_{zz} = A\sigma_{zz} = A\left(\frac{\varepsilon_0}{2} (E_{zz}^2 - E_{xx}^2 - E_{yy}^2)\right) = \frac{1}{2}\left(\varepsilon_0 A\right)\left(\frac{V}{g}\right)^2$$ , where $E_{xx} = E_{yy} = 0$ and $E_{zz} = \frac{V}{d}$.
However, the force is commonly derived using an energy method: $$F_{zz} = \frac{1}{2} \left(-\frac{\partial C}{\partial g}\right)V^2 -= \frac{1}{2} \left(\varepsilon_0\varepsilon_rA\right)\left(\frac{V}{g}\right)^2$$ , where $C = \frac{\varepsilon_0\varepsilon_rA}{g}$ is the capacitance. I've tried using an FEA software (Altair Flux), and found that the second equation seems to be quite accurate with what the software predicts given voltage boundary conditions on both sides of the dielectric.
My question: Why does my derivation using the Maxwell stress tensor omit the $\varepsilon_r$? I couldn't find any reference that says the Maxwell stress tensor is different inside a dielectric (and, trying to follow the original derivation, I don't immediately see where a $\varepsilon_r$ term would come from), but I would love any pointers/explanations on how to derive the first equation using the Maxwell stress tensor.