Let $\pi:\mathcal{X} \to B$ be a family (flat, projective, surjective morphism) of projective curves (not necessarily reduced) where $B$ is smooth, irreducible. Suppose that for some closed point $b_0 \in B$, $\pi^{-1}(b_0)=\mathcal{X}_{b_0}$ can be embedded into $\mathbb{P}^n$ for some integer $n$. Does there exist an open neighbourhood $U \subset B$ containing $b_0$ such that for all $b \in U$, $\pi^{-1}(b)$ can be embedded into $\mathbb{P}^n$ for the same integer $n$?

No, that is not true. I am sure that somebody else has answered this on MO before. I guess the simplest example is a family of genus 6 curves, where some fibers are embeddable as plane quintics. If memory serves, the canonical image of a general genus 6 curve (non-hyperelliptic) is the intersection of a Pfaffian quintic del Pezzo surface and a quadric hypersurface in $\mathbb{P}^5$. So there is an "explicit" irreducible family of genus 6 curves dominating the moduli space $\mathcal{M}_6$.

Of course $\mathcal{M}_6$ has dimension $3(6)-3 = 15$. By parameter counts, the dimension of the moduli space of plane quintics is $$\text{dim}H^0(\mathbb{P}^2,\mathcal{O}(5)) - \text{dim}\textbf{GL}_3 = 21 - 9 = 12.$$ Since $12<15$, a typical genus 6 curve is not isomorphic to a plane quintic. (In terms of the canonical embedding, the condition is that the curve is contained in a Veronese surface in $\mathbb{P}^5$.)