Isotriviality: two definitions Consider a proper flat morphism of $k$-schemes ($k$ is an algebraically closed field) $ f:X\longrightarrow\mathbb P^1_k$ such that every fiber $X_p$ for $p\in\mathbb P^1_{\mathbb C}$ is a reduced connected projective stable curve of genus $g$. 

$X$ is said an isotrivial family of curves if there is an open
  dense subset $U\subseteq\mathbb P^1_{\mathbb C}$ such that all fibers
  $\{X_p\,:\, p\in U\}$ are smooth and isomorphic.

In literature one can find also the following alternative definition of isotriviality:

$X$ is isotrivial if the the modular map $\varphi_f:\mathbb
  P^1_{\mathbb C}\longrightarrow \overline{M_g}$ is constant. (Here  $\overline{M_g}$ is the moduli space of stable curves).

I don't understand why the two definitions are equivalent: in particular the first definition says that the moduli morphism is constant on the open dense subset $U$, but why can we conlude that it is constant on all $\mathbb P^1_{\mathbb C}$ ($\overline{M_g}$ is not Hausdorff)?
 A: Let $f:X\to B$ be  a stable curve of genus $g$ over a finite type integral $\mathbb C$-scheme.
Lemma 1. The moduli map $B\to \bar {M_g}$ is constant if and only if there exists a dense open $U$ of $B$ such that all fibers of $X$ over $U$ are isomorphic.
Proof. (Compare with jmc's comment.) If $B\to \bar{M_g}$ is constant, then the fibers of $X\to B$ are all isomorphic (by definition). So take $U=B$. Conversely, if all fibers over (some dense open) $U$ are isomorphic, then $U\to \bar {M_g}$ is constant. The extension of the moduli map to $B$ (which exists by assumption) is then also constant. QED
Now, to answer your question, as Laurent Moret-Bailly points out, you need some regularity hypothesis as well.
Theorem. Suppose that $X$ is non-singular. Then the moduli map $B\to \bar {M_g}$ is constant if and only if there exists a dense open $U$ of $B$ such that all fibers of $X$ over $U$ are  smooth and isomorphic.
Proof. Since $X$ is nonsingular, the morphism $X\to B$ is smooth over some open $U$. In particular, if $B\to \bar{M_g}$ is constant, then its image lies in $M_g$. Conversely,  apply the lemma with $B$ replaced by $U$. QED
