Proposition. $f(x)=x$ for all $x\in\mathbb R$.
Proof. Let $g(x)=x-f(x)$, $Y=\{g(x)\mid x\in\mathbb R\}$ and $s=\sup Y\in\mathbb R\cup\{+\infty\}$.
If $0\le x <1$, we find from $(2)$ that $ f(x)=f(\sqrt x^2)=f(\sqrt x)^2\ge 0$ and hence $g(x)<1$.
By $(1)$, $g$ is periodic with period $1$ so that we have $g(x)<1$ for all $x\in\mathbb R$ and hence $s\le 1$ (especially, $s$ is finite).
As an intermezzo, we show a little
Lemma. If $y\in Y$ and $a\in\mathbb R$, then there exists $x\in[a,a+1)$ such that $(2x-y)y\in Y$.
Proof:
Since $g$ is periodic with period $1$, there exists some $x\in[a,a+1)$ with $g(x)=y$. We
compute $(2x-y)y=(x+f(x))(x-f(x))=x^2-f(x)^2=x^2-f(x^2)=g(x^2)\in Y$. $_\square$
Back to the proof of the proposition.
Assume $Y\ne \{0\}$.
Let $y\in Y\setminus\{0\}$.
If $y>0$ then immediately $s\ge y>0$.
If $y<0$, let $a=\frac y2-1$ in the lemma and obtain $2x-y<0$, hence again $s\ge (2x-y)y>0$.
Therefore, we have $0<s\le 1$.
Select $y\in Y$ with $y>\frac s2>0$ and let $a=1+\frac y2$ in the lemma, we obtain $2x-y\ge 2$, i.e. the contradiction $s\ge (2x-y)y\ge2y>s$.
We conclude that $Y=\{0\}$, i.e. the proposition. $_\square$