I think your question has a positive answer: The Kodaira-Spencer maps at each point $p \in B$ fit together to give a map of sheaves $\Theta_B \to R^1 f_* \Theta_{X/B}$ and your condition implies that this is map is zero. One may then base change to $C$ and apply Kuranishi's theorem (On the locally complete families of complex analytic structures. Ann. of Math. (2) 75 1962 536–577, in particular, Theorem 3) to deduce that all fibres are isomorphic as complex manifolds and hence, by GAGA, also as algebraic varieties. (The point is that one does not need a global moduli space, it suffices to have something that works analytically locally and this is supplied by Kuranishi's theorem.)
It is possible to give a purely algebraic proof of this by replacing the Kuranishi space by the Hilbert scheme of closed subschemes of $P^n$ for some large $n$ (depending on $X$) and analyzing the tangent map of the map from $B$ to such a scheme induced by choosing a projective embedding of $X$. This requires some more arguments since distinct points in the Hilbert scheme do not necessarily correspond to non-isomorphic subvarieties.
I think I can prove the following
Theorem: Let $R$ be a $k$-algebra of finite type with a closed point $x\in \mathrm{Spec} R$ such that $\mathrm{Spec} R\setminus \{x\}\cong \mathbb{A}^2_k\setminus \{(0,0)\}$. Let $\tilde{R}$ be a $t$-adically complete flat lift of $R$ to $k[[t]]$. Then $\mathrm{Spf} \tilde{R}\setminus \{x\}\cong \mathbb{A}^2_{\mathrm{Spf} k[[t]]}\setminus \{(0,0)\}$.
As mentioned in the question, there do exist nontrivial deformations to $k[[t]]/t^n$ for any $n$; for that reason, I find this result surprising: Lifting to $k[[t]]$ poses a strong rigidity that I was not previously aware of.
In particular, there are no examples to the above question with $X$ affine. The proof below also shows that my intended application of algebraic deformations of the punctured affine plane cannot work, so I consider my question as answered in the negative (although strictly speaking the question posed is still open).
Let me start with something seemingly unrelated.
Proposition: Let $K$ be some field, let $X/K$ be a smooth surface, and let $C\cong \mathbb{P}^1\subset X$ be a smooth rational curve in $X$ with self-intersection $C^2 = 1$. Then there is an open subset $U\subset X$ containing $C$ and an open embedding $U\hookrightarrow \mathbb{P}^2$ (carrying $C$ into a line).
I deduced this (hopefully correctly) from the classification of surfaces (showing first that $X$ has to be rational); probably there is a more direct argument.
Now consider $Y=\mathbb{P}_k^2\setminus \{(0:0:1)\}$, with its line $C\subset Y$ at infinity. Let $R$ and $\tilde{R}$ be as above. Glue $Y$ with $\mathrm{Spec} R$ along $\mathbb{A}^2_k\setminus \{(0,0)\}$ to $\bar{Y}$ over $k$; this is projective, with $C$ an ample divisor. As $H^2(\mathbb{P}_k^2,T_{\mathbb{P}_k^2}(-C))=0$, one checks that any deformation of $R$ can be extended to a deformation of $\bar{Y}$ which also lifts $C$. In particular, $\tilde{R}$ can be extended to a proper flat formal scheme $\tilde{\bar{Y}}$ with a lift $\tilde{C}$ of $C$, over $\mathrm{Spf} k[[t]]$. By formal GAGA, this is algebraizable, to a projective surface $Z$ over $\mathrm{Spec} k[[t]]$, and $D\cong \mathbb{P}^1\subset Z$. The smooth locus of the generic fibre of $Z$, together with the generic fibre of $D$, satisfies the assumptions of the Proposition. It follows that there is a birational map from the smooth locus of the generic fibre of $Z$ to $\mathbb{P}^2_{k((t))}$. It cannot contract anything: If a curve $E$ was contracted, then this curve would meet the generic fibre of $D$ (as $D$ is ample), but in a neighborhood of $D$, the map is well-defined. Moreover, it cannot have critical points, as the target $\mathbb{P}^2_{k((t))}$ contains no exceptional curves. It follows that the smooth locus of the generic fibre of $Z$ is open in $\mathbb{P}^2_{k((t))}$. As its image contains an ample curve, it follows that the codimension of the image is at least $2$.
Now consider the reduction map $H^0(Z^{\mathrm{sm}},\mathcal{O}(nD))\to H^0(Y,\mathcal{O}(nC))$, where $Z^{\mathrm{sm}}\subset Z$ denotes the smooth locus; it induces an injection $H^0(Z^{\mathrm{sm}},\mathcal{O}(nD))/t\to H^0(Y,\mathcal{O}(nC))$. Both have the same dimension as $H^0(\mathbb{P}^2,\mathcal{O}(n))$. It follows that the map has to be surjective. It follows that $\mathrm{Proj} \bigoplus H^0(Z^{\mathrm{sm}},\mathcal{O}(nD))$ is a flat deformation of $\mathbb{P}^2_k$, thus is isomorphic to $\mathbb{P}^2_{k[[t]]}$. We get an open embedding $Z^{\mathrm{sm}}\hookrightarrow \mathbb{P}^2_{k[[t]]}$, which restricts to an isomorphism $\mathrm{Spf} \tilde{R}\setminus \{x\}\cong \mathbb{A}^2_{\mathrm{Spf} k[[t]]}\setminus \{(0,0)\}$, as desired.
Addendum: For completeness, I deduce the Proposition (in case $K$ is algebraically closed -- one can then remove this hypothesis) from the paper "Curves with high self-intersection on algebraic surfaces" of Hartshorne (I will use freely notation from there). We may assume that $X$ is proper. First, $X$ is rational: Fix a point $x\in C$. Because $C$ is very free, there is a $1$-parameter family of rational curves which contain $x$. As these curves intersect with multiplicity $1$, no two of them can have the same tangent vector at $x$. It follows that this family is defined over a rational base, thus $X$ is (uni-, and thus) rational. Now we use Theorem 3.5 in Hartshorne's paper. Case a) means that $C\subset X$ is equivalent to a section of a rational Hirzebruch surface $F_e\to \mathbb{P}^1$. The condition $C^2=1$ will then ensure that $e=1$, and that the curve $C$ does not meet the exceptional locus of $F_1\to \mathbb{P}^2$, giving the result. Case b) cannot occur. Case c) could cause trouble. Looking into the proof, only the case $m=2$ might occur. Looking at how the case $m=2$ comes about in Proposition 3.2, we see that we must have $e+n=1$. The case $e=0$, $n=1$ is impossible because of condition b) in Proposition 3.1, and the other case $e=1$, $n=0$ is impossible because of condition e) in Proposition 3.1.
Best Answer
$\DeclareMathOperator{\Ext}{Ext} \newcommand{\G}{\hat{\mathbb{G}}} \DeclareMathOperator{\Maps}{Maps} \renewcommand{\phi}{\varphi}$ The analysis of the infinitesimal deformation space of the Honda formal groups $H_n$ uses three calculations which govern the existence of square-zero deformations. These can be phrased in terms of certain $\Ext$ groups, and here's how I think of them: we want to study the deformation of a formal group $G_0$ over a ground ring $R_0$ along a square-zero infinitesimal deformation $I \to R \to R/I = R_0$ to a formal group $G$ over $R$. Because $I$ is square-zero and the only formal group law truncated at degree $2$ is the additive formal group, we think of $G$ as sitting in an extension $I \otimes \G_a \to G \to G_0$ sort of "over" the original extension of $R$-modules. So, to study these extensions (their existence, their uniqueness, so on), we want to calculate some kind of $\Ext$ groups of the form $\Ext^*(G_0; \G_a)$.
This is exactly what Lubin and Tate do in their paper. Fix a pair of formal groups $F$ and $G$; then there's a simplicial object $BF = B_*(*, F, *)$ associated to $F$ via its group structure, and the cosimplicial object $\operatorname{Maps}(BF, G)$ should be a thing whose cohomology $H^*_{LT}$ computes $\Ext^{*-1}(F; G)$. Trying to work out exactly what this means, you'll find the following descriptions of the first few groups (written in coordinates, but this is inessential):
$$H^1_{LT}(F; G) = \{\phi: F \to G \mid \phi(x) - \phi(x + y) + \phi(y) = 0\} = \operatorname{Hom}(F, G),$$ $$H^2_{LT}(F; G) = \frac{\{\phi: F^2 \to G \mid \phi(x, y) - \phi(x, y + z) + \phi(x + y, z) - \phi(y, z) = 0\}}{\{\delta^1 \phi \mid \phi : F \to G, \delta^1 \phi(x, y) = \phi(x) - \phi(x + y) + \phi(x)\}},$$ $$H^3_{LT}(F; G) = \frac{\left\{\phi: F^3 \to G \middle| \begin{array}{c}\phi(x, y, z) - \phi(x, y, z + w) + \phi(x, y + z, w) - \\ \phi(x + y, z, w) + \phi(y, z, w) = 0\end{array}\right\}}{\{\delta^2 \phi \mid \phi : F^2 \to G, \delta^1 \phi(x, y) = \phi(x, y) - \phi(x, y + z) + \phi(x + y, z) - \phi(y, z)\}}.$$
General facts about infinitesimal deformation theory then tell you the utility of these groups: $H^1_{LT}$ tracks automorphisms of the square-zero deformation space, so it tells you whether you should expect the deformation space to be a scheme or some sort of stack; $H^3_{LT}$ tracks the obstruction to the existence of square-zero deformations; and $H^2_{LT}$ tracks the available square-zero extensions, in the sense that when $H^1_{LT} = 0$, its dimension will tell you the dimension of the tangent space of the deformation space.
So, Lubin and Tate go about computing these three things in the case that $G_0 = H_n$ is the height $n$ Honda formal group. They know that $\operatorname{Hom}(H_n, \G_a) = 0$, and so $H^1_{LT} = 0$. They also compute that $H^3_{LT} = 0$, so they know that the deformation space they're computing is actually a formal variety --- there are never any kind of conditions imposed on their generators $u_i$ to ensure the existence of a deformation. The only thing left is to determine the dimension of the formal variety, and they compute $\dim \Ext^1(H_n, \G_a) = n-1$.
You ask what happens when we replace $H_n$ with $\G_a$ and instead study $H^*_{LT}(\G_a; \G_a)$. The computation of these cohomology groups is worked out in the COCTALOS notes, and also in Theorem 4.3 and Section 8.4 of a project I worked on: [link]. Grinding through the homological algebra, you'll find that the group $H^n_{LT}$ consists of the polynomials of homogeneous degree $n$ in the dual Steenrod algebra, after assigning the degrees $|\xi_*| = 1$, $|\tau_*| = 1$, and $|P_*| = 2$.
All of these things are woefully $\infty$-dimensional. I don't actually know what that means for the existence of your object --- and so this isn't a proper answer --- but I do know that it isn't anywhere as simple as the case Lubin and Tate analyze.
P.S.: Since I'm updating this answer anyway, Section 2.2 of the Hopkins-Lurie Ambidexterity manuscript describes computing $H^*_{LT}(\Gamma; \G_a)$ for any connected $p$–divisible group $\Gamma$ and any value of $*$. This generalizes all but the last paragraph of this answer, since $\G_a$ is not $p$–divisible.