Theorem 24.1.15 says the following: "Let $M_1$ and $M_2$ be metric spaces, $S$ a subset of $M_1$, and $f : S \to M_2$. If $f$ is uniformly continuous and $M_2$ is complete, then there exists a unique continuous extension of $f$ to $\overline S$. Furthermore, this extension is uniformly continuous".
Let's concentrate on the special case where $M_1=M_2=:M$, and $S$ is dense in $M_1=M$, so we get: Let $M$ be a metric space, $S$ a dense subset of $M$, and $f : S \to M$. If $f$ is uniformly continuous and $M$ is complete, then there exists a unique continuous extension of $f$ to $M$. Furthermore, this extension is uniformly continuous.
My question: If we know that actually $f:S \to S$ and $f$ is an automorphism of finite order $d$, and if we also know that the unique continuous extension $F: M \to M$ is an automorphism, is it true that $F$ must be of order $d$?
Remarks: (1) See also this question. (2) Perhaps this question can serve as a counter-example.