Step 1: Write $z$ and $\hat{z}$ in components.
Take $z = x + iy$. By the given rule, $\hat{z} = y + ix$, which simply swaps the real and imaginary parts.
Step 2: Form the sum $z + \hat{z}$.
Adding, $z + \hat{z} = (x + y) + i(y + x) = (x + y) + i(x + y)$. Both parts equal $x + y$.
Step 3: Form the difference $z - \hat{z}$.
Subtracting, $z - \hat{z} = (x - y) + i(y - x) = (x - y) - i(x - y)$. Both parts have size $|x - y|$.
Step 4: Compute the two moduli.
$|z + \hat{z}| = \sqrt{(x + y)^2 + (x + y)^2} = |x + y|\sqrt{2}$. Similarly $|z - \hat{z}| = |x - y|\sqrt{2}$.
Step 5: Apply the given equality.
Setting them equal and dividing by $\sqrt{2}$: $|x + y| = |x - y|$. Squaring both sides gives $(x + y)^2 = (x - y)^2$.
Step 6: Simplify to find the locus.
Expanding, $x^2 + 2xy + y^2 = x^2 - 2xy + y^2$, so $4xy = 0$, meaning $xy = 0$. That holds when $x = 0$ or $y = 0$, which is exactly the imaginary axis together with the real axis.
\[ \boxed{\text{the union of the real axis and the imaginary axis}} \]