The important thing to note here is that the inverse of an orthogonal matrix is its transpose, so the basis change $S \leadsto O^{-1}SO$ is actually (also) $S \leadsto O^TSO$, in which form the symmetry-preserving nature of orthogonal basis changes is near-obvious:
$$(O^TSO)^T = O^TS^T(O^T)^T = O^TS^TO = O^TSO.$$