For completeness of the post and as a small adition to MaoWao's excellent answer, I would like to include an argument for the proof that if $M,N$ are von Neumann algebras and $\phi:M\to N$ is a w$^*$-continuous $^*$-homomorphism, then $\phi(M)$ is $w^*$-closed. The proof below is in the same spirit as the one in Sakai's book.
Note that we can assume without loss of generality that $\phi$ is injective. For that, one needs to observe that $I:=\ker(\phi)$ is a $w^*$-closed ideal and consider the quotient $M/I$, which is also a von Neumann algebra$^{\text{note1}}$. Now the map $\psi:M/I\to N$ defined by $\psi(x+I)=\phi(x)$ is a well-defined, injective $*$-homomorphism that is $w^*$-continuous$^{\text{note2}}$ and $\psi(M/I)=\phi(M)$.
So assume that $\phi$ is also injective. As a $*$-homomorphism between $C^*$-algebras, $\phi$ is isometric. Let $y\in(\overline{\phi(M)}^{w^*})_{sa}$ with $\|y\|=1$. By Kaplansky's density theorem we can find a net $(x_i)\subset M$ with $\|\phi(x_i)\|\le1$ for all $i$ such that $\phi(x_i)\to y$ ultraweakly. But then $\|x_i\|=\|\phi(x_i)\|\le1$, so $(x_i)$ is a net in the closed unit ball of $M$, which is $w^*$-compact (by Banach-Alaoglu). Thus there exists a subnet $(x_{i_j})$ and some $x\in M$ with $x_{i_j}\to x$ ultraweakly. But then $\phi(x_{i_j})\to y$ and $\phi(x_{i_j})\to\phi(x)$. Uniqueness of the ultraweak limit yields $y=\phi(x)$. As $\overline{\phi(M)}^{w^*}$ is a $C^*$-algebra it is spanned by its self-adjoint elements of norm $1$ which we already proved that are included in $\phi(M)$, hence $\overline{\phi(M)}^{w^*}\subset\phi(M)$ as we wanted.
note 1: one actually shows that if $I$ is a $w^*$-closed ideal then there exists a projection $e\in Z(M)$ such that $I=eM=eMe$ and thus the map $x+I\mapsto(1-e)x(1-e)$ gives an isomorphism $M/I\cong (1-e)M(1-e)$, which is a von Neumann algebra as a corner of $M$. Note also that since $e\in Z(M)$ we have $(1-e)x(1-e)=(1-e)x=x(1-e)$ for all $x\in M$.
note 2: let $x_i+I\to x+I$ in $M/I$ ultraweakly. Transfer everything through the above isomorphism to $(1-e)M(1-e)$, so $(1-e)x_i(1-e)\to(1-e)x(1-e)$ ultraweakly. Apply $\phi$ which is known to be $w^*$-continuous to get $\phi(x_i(1-e))\to\phi(x(1-e))$. But $\phi(x_ie)=0=\phi(xe)$, so we have $\phi(x_i)\to\phi(x)$ ultraweakly.