I'm sorry for the following elementary question.
Things are algebraic/holomorphic over $\mathbb{C}$.
I'm reading the book "Vector bundles on Complex Projective Spaces" by Okonek et al. and the following is from Theorem 4.1.14. Chapter II.
Let $q:P\rightarrow M$ be a principal $G$-bundle (the action is called $\rho$) where $G$ is a product of $GL_k$'s and $M$ and $P$ are smooth. Let $X$ be a smooth surface. Let $E$ be a vector bundle on $X\times M$ such that the action $id_X\times \rho$ of $G$ on $X\times M$ can be linearized for $E$.
(In the book, $X=\mathbb{P}^2$ and $P$ parametrizes certain monads on $X$ and it descends via the (free) action of $G$ to the smooth moduli of rank $2$ stable sheaves with given Chern classes on $X$.)
Why is $E/G$ (more precisely, $((id_X\times q)_*E)^G$) locally free?
Is $q$ being locally trivial necessary here? Or is the above still true if $M$ is simply a free quotient by $G$ of $P$ ($M$ and $P$ are still smooth)?