Artificial intelligent assistant

Composition of two bijective constant displacement maps Let $(M,d)$ be a metric space. A constant displacement map is a function $f$ from $M$ to $M$ such that $d(x,f(x))=d(y,f(y))$. My question is this: Is the composition of two bijective constant displacement maps also a constant displacement map? And if not, is the composition of two isometric bijective constant displacement map also constant displacement?

Since the answer is already known to the OP (thanks to the hint by studiosus), I post it here. Let $M=\\{1,2,3,4,5\\}$ with the discrete metric ($d(x,y)=1$ unless $x=y$). The permutation $(12)(345)$ is a bijective isometry and a constant displacement map. But its square is the cycle $(354)$, which is not a constant displacement map.

The above metric space can be realized as a subset of $\mathbb R^4$ with the standard metric. I wonder if there are counterexamples that are subsets of $\mathbb R^d$, $d\le 3$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f3d43c6c7c2cba71e83662d795d85bcb