What is the probability of getting equal numbers of heads and tails?
The linked answer is wrong even for $n=2$. For $n=2$ we have $HT$ and $TH$ as the only possible winning paths, so the answer is $\frac 12$. But $\frac 22\times \left( \frac 12\right)^2=\frac 14$.
Worth noting that the answer you provide correctly gives $$\binom 21\times \left( \frac 12\right)^2=\frac 12$$
Indeed, your answer is correct for all (even) $n$.