How to find the best similarity transformation between two symmetric matrices $\mathbf{A}$ and $\mathbf{B}$?

Suppose I have two matrices $$\mathbf{A}\in\mathbb{R}^{n\times n}$$ and $$\mathbf{B}\in\mathbb{R}^{n\times n}$$. I want to know what's the best similarity transformation between these two matrices when we restrict the transformation to be a rotation, i.e. how shall we solve $$\min_{\mathbf{R}\in\mathcal{O}^{n\times n}} \|\mathbf{R}^\top\mathbf{A}\mathbf{R}- \mathbf{B}\|_{\mathbf{F}}.$$ Here $$\mathcal{O}^{n\times n}$$ denotes the set of $$n$$ by $$n$$ orthonormal matrices. Can the solution be explicitly written in terms of $$\mathbf{A}$$ and $$\mathbf{B}$$, as in the case for Procrustes flow?