Let $A, G, H$ ∈ $M_n$ be positive definite and suppose that $GAG = HAH$.
Why does $G = H$?
It is well known that the square root of a positive definite matrix is unique (see Square root of Positive Definite Matrix), but this only solves the case $A=\rm{id}$. Does the general case also follow from this?
The general case also follows from the uniqueness of square roots as follows:
If we multiply your assumption by $A^{1/2}$ from left and right, we get $$ (A^{1/2} G A^{1/2} )(A^{1/2} G A^{1/2} ) = (A^{1/2} H A^{1/2} ) (A^{1/2} H A^{1/2} ). $$
Since both $A^{1/2} G A^{1/2} $ and $A^{1/2} H A^{1/2} $ are positive definite (why?), uniqueness of square roots shows that they are identical. By multiplying with $A^{-1/2} $ from the left and right, we get $G=H$ as desired.