Let $\Omega$ be a bounded domain. I write $L^2$ instead of $L^2(\Omega)$ etc.
Let $u \in L^2(0,T;H^1)$ with weak derivative $u' \in L^2(0,T;H^{-1})$.
Consider $$f(u(x,t)) = \begin{cases} -1 &: u(x,t) \in (-\infty, -1)\\ u &: u(x,t) \in (-1, 1)\\ 1 &: u(x,t) \in (1, \infty). \end{cases}$$
We have $f(u) \in L^2(0,T;L^2)$. Does it make sense to talk of a weak derivative of $f(u)$? We could naively write
$$(f(u))' = \begin{cases} 0 &: u(x,t) \in (-\infty, -1)\\ u' &: u(x,t) \in (-1, 1)\\ 0 &: u(x,t) \in (1, \infty). \end{cases}$$ and then write this as $(f(u))' = \chi_{\{u \in (-1,1)\}}u'$ but I can't make sense of this.
To begin with, a function $$ f(\xi)\overset{\rm def}{=} \begin{cases} -1,\quad \xi<-1,\\ \xi,\quad \xi\in [-1,1],\\ 1,\quad \xi>1, \end{cases} $$ is Lipschitz, and hence by theorem 2.1.11 from the textbook "Weakly differentiable functions" by W.P. Ziemer, given any $u\in L^2(0,T;H^1)$, for Sobolev weak derivatives, holds the chain rule $$ \partial_{x_k} f(u)=\partial_{x_k} (f\circ u)=f'(u)\cdot\partial_{x_k} u $$ implying that a superposition $f(u)=f\circ u\in L^2(0,T;H^1)$, while a superposition $f'(u)=f'\circ u\in L^{\infty}(0,T;H^1)$. Indicated in the post just $f(u)\in L^2(0,T;L^2)$ is not enough for a distributional derivative $\partial_t$ to be correctly defined, which requires a rather more delicate approach than Sobolev weak derivatives $\partial_{x_k}$. Namely, the chain rule $$ \partial_t f(u)=\partial_{x_k} (f\circ u)=f'(u)\cdot\partial_t u $$ holds with the R.H.S. being a correctly defined product of a distribution $\partial_t u \in L^2(0,T;H^{-1})$ by a function $f'(u)=f'\circ u\in L^{\infty}(0,T;H^1)$, which correctly defines a distribution $\partial_t f(u)\in L^2(0,T;H^{-1})$, with distributions understood here as functional-valued Bochner measurable functions $(0,T)\to H^{-1}\overset{\rm def}{=} \bigl(H_0^1(\Omega)\bigr)^{\ast}$.