Let $k$ be a field and let $k[t, x]$ be the polynomial ring in two variables. Is it true that $k[t][[x]]=k[t]\otimes_kk[[x]]$ or does the completion of $k[[x]]$ make that impossible? We can compute
$$k[t][[x]]\cong\lim_i k[t,x]/(x^i)=\lim_i\oplus_{j\leq i}k[t]x^j=\prod_i k[t]x^i=\\ \prod_i k[t]\otimes_k x^i,$$
where $x^i$ in the tensor product is the $1$-dimensional vector space over $k$ spanned by $x^i$.
The computation does not tell me much about whether we can commute $k[t]$ with the direct product. Can we?
As described in the comments, $k[t] \otimes k[[x]]$ is a proper subspace of $k[t][[x]]$, and the issue is that the tensor product only contains elements which have bounded degree in $t$, so cannot contain e.g. $\sum t^n x^n$.
Abstractly the issue is that, because $k[t]$ is infinite-dimensional, taking the tensor product $k[t] \otimes (-)$ does not commute with infinite products. We can show more generally that if $M$ is a flat module then $M \otimes (-)$ commutes with infinite products iff $M$ is finitely presented; see this math.SE answer.
Probably taking the completion fixes this but I'm not familiar enough with completions to say this with any real confidence.