I suppose it is necessary to consider what happens when $x < 0.$ There is a question of interpretation of $x^{\frac{1}{x}}$ for $x \leq 0,$ ( for example, $(-1)^{r}$ could reasonable interpreted as a non-real complex number if $r$ is an irrational positive real number, if we consider $-1$ to be $e^{i \pi}$), so I assume the function only to be defined for $x >0$, where it is defined to be $e^{\frac{\log x}{x}}.$ As far as this question is concerned, it seems that the case $x >0$ is the most relevant case anyway.
Note that $x >0$ is a solution of $x^{\frac{1}{x}} = 2^{\frac{1}{2}}$ if and only if $\frac{\log x}{x} = \frac{\log 2}{2}.$ The derivative of $\frac{\log x}{x}$ is $\frac{ 1 - \log x}{x^{2}}$ which is positive when $x <e$ and negative when $x > e.$ Hence $\frac{\log x}{x}$ increases when $x <e$, then decreases when $x >e$, taking a maximum value when $x = e.$ The values of $\frac{ \log x}{x}$ are positive on $(1, \infty)$ and the function is differentiable on that interval.Now if $\frac{log{x}}{x} = \frac{\log{y}}{y}$ for $1 < x < y,$ then the derivative vanishes somewhere on $(x,y)$ by the Mean Value Theorem. Since the derivative vanishes only at $e$, we see that any value of $\frac{\log x}{x}$ can be attained at most twice. Since $\frac{\log{4}}{4} = \frac{2\log 2}{2 \times 2} = \frac{\log 2}{2},$ we see that $2$ and $4$ are the only values of $x$ for which $x^{\frac{1}{x}} = 2^{\frac{1}{2}}.$