To prove the non-existence of a UMP test for this two-sided hypotheses based on the normal distribution family, use proof by contradiction. The idea is that if such a UMP test for testing the two-sided hypotheses existed, then it would also become UMP tests for testing two one-sided hypotheses, which enabled us to arrive at a contradiction.
Without loss of generality, assume $\sigma^2 = 1$. In order to show that no size $\alpha$ UMP test (abbreviated as UMP-$\alpha$ test hereafter) exist for testing
\begin{align*}
H: \mu = \mu_0 \text{ versus } K: \mu \neq \mu_0, \tag{1}\label{1}
\end{align*}
consider the following two related one-sided hypotheses testing problem:
\begin{align*}
& H: \mu = \mu_0 \text{ versus } K_+: \mu > \mu_0, \tag{2}\label{2} \\
& H: \mu = \mu_0 \text{ versus } K_-: \mu < \mu_0. \tag{3}\label{3}
\end{align*}
Given an i.i.d. sample $(X_1, \ldots, X_n) \sim N(\mu, 1)$, it is well-known that (cf. Corollary 3.4.1 of Testing Statistical Hypotheses (Third Edition) by Lehmann and Romano) the UMP-$\alpha$ test for testing $\eqref{2}$ exists, and takes the form
\begin{align*}
& \tau_+(\bar{x}) = \begin{cases}
1 & \bar{x} > \mu_0 + \frac{1}{\sqrt{n}}z_\alpha, \\
0 & \bar{x} < \mu_0 + \frac{1}{\sqrt{n}}z_\alpha.
\end{cases} \tag{4}\label{4}
\end{align*}
Similarly, the UMP-$\alpha$ test for testing $\eqref{3}$ exists, and takes the form
\begin{align*}
& \tau_-(\bar{x}) = \begin{cases}
1 & \bar{x} < \mu_0 - \frac{1}{\sqrt{n}}z_\alpha, \\
0 & \bar{x} > \mu_0 - \frac{1}{\sqrt{n}}z_\alpha.
\end{cases} \tag{5}\label{5}
\end{align*}
In $\eqref{4}$ and $\eqref{5}$, $z_\alpha$ denotes the upper-$\alpha$ quantile of a standard normal distribution.
Now suppose if a UMP-$\alpha$ test $\tau$ exists for testing $\eqref{1}$, then it must also be a UMP-$\alpha$ test for testing $\eqref{2}$ and $\eqref{3}$. As a result, we have found two UMP-$\alpha$ tests $\tau$ and $\tau_+$ for testing $\eqref{2}$, which implies that power functions of $\tau$ and $\tau_+$ evaluated at each parameter in $K_+$ must be identical, i.e., $E_\mu(\tau(\bar{X})) = E_\mu(\tau_+(\bar{X}))$ for each $\mu \in (\mu_0, +\infty)$. That is, if denoting $\tau - \tau_+$ by $g$, then $E_\mu(g(Y)) = 0$ holds for all $\mu \in (\mu_0, +\infty)$, where $Y \sim N(\mu, n^{-1})$. Since the family $\{N(\mu, n^{-1}): \mu \in (\mu_0, +\infty)\}$ is complete (check this link for a short proof), $E_\mu(g(Y)) = 0$ for all $\mu \in (\mu_0, +\infty)$ implies that $P_\mu(g(Y) = 0) = 1$, i.e., $g = 0$ a.e., or $\tau = \tau_+$ a.e.. In the same manner, it can be shown that $\tau = \tau_-$ a.e.. Therefore, $\tau_+ = \tau_-$ a.e., which is in clear contradiction with $\eqref{4}$ and $\eqref{5}$, as they clearly don't agree almost everywhere on the real line.
Note that this question is just a special case of the following more general result (Problem 3.54 in Testing Statistical Hypotheses). A proof to this general result, which is of the same spirit as the proof above, can be found in this answer.
Let $\theta$ be a real number, and let $X$ have probability density (with respect to some measure $\mu$)
\begin{align*}
p_\theta(x) = C(\theta)e^{Q(\theta)T(x)}h(x),
\end{align*}
where $Q$ is strictly monotone. Given $\theta_1 < \theta_2$, prove there does not exist UMP test of size $\alpha$ (where $0 < \alpha < 1$) for testing
\begin{align*}
H: \theta = \theta_0 \text{ versus } K: \theta \neq \theta_0. \tag{$\star$}\label{star}
\end{align*}
In words, there exists no UMP test for two-sided hypotheses $\eqref{star}$ if sample is from an one-parameter exponential family. This is in consistent with what your professor told you. The uniform family you mentioned in the end of your post, does NOT make this statement invalid because the uniform distribution family is not an exponential family!