Cantlog gives a nice example, but perhaps the OP wants an example where the geometric generic fiber is irreducible: it depends on your interpretation of "variety". Let $B$ be $\mathbb{A}^3$ with coordinates $(x,y,z)$. Let $U$ be $\mathbb{A}^3\setminus\{0\}$. Let $\mathcal{E}$ be the cokernel of the following map of locally free $\mathcal{O}_B$-modules, $$ \mathcal{O}_B \xrightarrow{(x,y,z)} \mathcal{O}_B^{\oplus 3}.$$ The point is that for every integer $d$, $\textbf{Sym}^d_{\mathcal{O}_B}(\mathcal{E})$ is coherent and reflexive, yet not locally free at $0$. Now take $\overline{X}$ to be $\textbf{Proj}_B(\textbf{Sym}^\bullet_{\mathcal{O}_B}(\mathcal{E}))$ with its natural projection $\overline{\pi}:\overline{X}\to B$. Define $X$ to be the inverse image of $U$. This is flat over $U$, in fact just a $\mathbb{P}^1$-bundle. However, I claim that there is no flat extension of $X$ over $B$. It is "well known" that every flat, proper morphism with $1$-dimensional fibers is projective, at least étale locally over the base. You can find this explicitly in some writings of Brian Conrad (I think also Max Lieblich, probably many other sources as well). So if $X/U$ extended to a flat family over the base, then, after passing to the Henselization of $\mathcal{O}_{B,0}$, the family would be projective. The relative Picard of $X/U$ is just the constant fppf sheaf $\mathbb{Z}$ with generator the Serre twisting sheaf $\mathcal{O}(1)$ naturally associated to the Proj construction. Thus, on the flat model, the very ample invertible sheaf restricts to $\mathcal{O}(d)$ over the punctured Henselization for some positive integer $d$. Because the morphism is flat and projective, for a sufficiently high twist of the very ample invertible sheaf, i.e., after replacing $d$ by a sufficiently positive multiple, there are no higher direct images and the pushforward to the base is locally free. But, over the punctured Henselization, the pushforward is just the pullback of $\textbf{Sym}^d_{\mathcal{O}_B}(\mathcal{E})$. Thus, there exists an extension of this sheaf to a locally free sheaf over the entire Henselization. But this is absurd: already $\textbf{Sym}^d_{\mathcal{O}_B}(\mathcal{E})$ is one reflexive extension over the entire Henselization, and reflexive extensions are unique up to unique isomorphism (using the S2 property). Since $\textbf{Sym}^d_{\mathcal{O}_B}(\mathcal{E})$ is not locally free at $0$, the base change to the Henselization is also not locally free.