simple properties of branches of complex square root and integrating a function with a branch of square root

If you make the branch cut along $(-\infty,0]$, then we obtain two branches for the complex square root. They are both functions that can be defined on all of $\mathbb C$, but not as a continuous function when you move in $\mathbb C$ across the ray $(-\infty,0]$. Lets call them for $z=r e^{i\theta}$, $\theta \in [-\pi,\pi)$, $$\sqrt[(1)]{re^{i\theta}}:= \sqrt r e^{i\theta/2},\\ \sqrt[(2)]{re^{i\theta}}:= \sqrt r e^{i\theta/2+\pi i}=-\sqrt[(1)]{re^{i\theta}}. $$ I'm not sure that the sentence

choose $\sqrt{\ }$ to denote the branch defined on $(-\pi, \pi)$

chooses a branch, but I think you meant to say that you wanted to choose what I called $\sqrt[(1)]{\,}.$ What "went wrong" is that you "went across" the branch cut. If $\sqrt[(1)]{\,}$ was continuous on all of $\mathbb C$, then there would be no need for cutting out branches. If you want to go past a branch cut without an abrupt change in values, what you should do is switch to the other branch. This is your "without the fix" result- $$\sqrt[(2)]{a^2b} =a\sqrt[(1)]{b}.$$ This is exactly what happens when you analytically continue along a path as in reuns's comment, i.e. if $f(t) = \sqrt[(1)]{e^{it}}$ is defined for $t\in (-\pi,\pi)$, then its analytic continuation (also called $f$) has $$ f(\arg b) = \sqrt[(1)]{b} \text{ but}\\ f(2\arg a + \arg b) = \sqrt[(2)]{a^2b} =a\sqrt[(1)]{b}.$$

(strictly speaking you analytically continue to larger and larger open subsets of $\mathbb C$, so instead of $t\in (-\pi,\pi)$ take a small open set containing this interval.)

In the integral, you are asked to use $\sqrt[(2)]{\,}$. What is presumably happening (I haven't checked) when you multiply by $w^2$ inside $\sqrt[(2)]{\,}$ is that it always pushes you to the other branch, regardless of the value of $w$.

The sketch of reuns's comment - define $$f:(-\pi,-\pi/2)\to \mathbb C, \quad f(t) = \sqrt[(2)]{25e^{i2t} + 11}$$ we find that applying this formula blindly in a neighbourhood of $-\pi/2$ leads to a discontinuity at $t=-\pi/2$. Analytically continuing instead, we end up with $$ f:\mathbb R \to \mathbb C,\\ \quad f(t) = \begin{cases} \phantom{\Big(}\!\!\!-\sqrt[(2)]{25e^{i2t} + 11} & t \in (-\pi/2,\pi/2) + 2k\pi\\ \sqrt[(2)]{25e^{i2t} + 11} & t \in (-\pi/2,\pi/2) + 2(k+1)\pi \end{cases} $$ And you should be able to integrate $$ \int_{-\pi}^\pi f(t)5ie^{it} dt. $$