Let $\mathbb{S}^n$ be the $n$-dimensional unit sphere, equipped with the standard round Riemannian metric.
Let $f:\mathbb{S}^n \to \mathbb{S}^n$ be a diffeomorphism and suppose that for every (parametrized) geodesic $\gamma$, $f \circ \gamma$ is also a (parametrized) geodesic.
Must $f$ be an isometry? (that is the restriction of an orthogonal matrix on $\text{O}(n+1)$).
An equivalent condition on $f$ is that $\nabla df=0$ where $\nabla=\nabla^{(T\mathbb{S}^n)^*} $ $ \otimes \nabla^{f^*T\mathbb{S}^n}$ is the relevant tensor product connection.