For any field $k$, the ring $A = k(U)[[X,Y,Z]](X^2+X^3+UX^6)$ is a UFD such that $A[[T]]$ is not a UFD. For a proof of this, see http://www.bdim.eu/item?fmt=pdf&id=RLINA_1966_8_40_5_801_0 For further developments, see the first two pages of https://www.mathnet.ru/links/0430018013d2da444a8fae38372db7fa/sm3365_eng.pdf (V. I. Danilov, On a conjecture of Samuel, Mathematics of the USSR- Sbornik, 1970, Volume 10, Issue 1, 127–137 DOI: 10.1070/SM1970v010n01ABEH001590) as well as https://www.math.purdue.edu/~jlipman/papers-older/%5B1975%5D%20Unique%20factorization%20in%20complete%20local%20rings.pdf