--edited--
May I know the group or condition that satisfies $$S^T A S = A$$ possibly when $A_{n\times n}$ is symmetric?
Meanwhile, below is an example for $S_{3\times 3}$.
MATLAB code:
A = [2.9603 1.3855 1.8212 %symmetric
1.3855 4.7366 1.2824
1.8212 1.2824 2.653];
S = [-0.29412 -0.35451 0.71379
0.15026 1.0698 0.18701
1.15 -0.0036714 0.17226];
S'*A*S % returns symmetric matrix A as 'ans' below
% it's off a bit as I intentionally rounded the elements in the
% matrices above for the sake of communicating this.
% ans =
% 2.9604 1.3856 1.8212
% 1.3856 4.7367 1.2824
% 1.8212 1.2824 2.653
Thanks in advance.