Proof of Lorentz invariant phase space factor I was going through the following proof of Lorentz invariant Phase space (in Modern Particle Physics by Mark Thomson).

Could someone please help me understand how the equation in the box is valid? If we are differentiating $p'_z=\gamma(p_z-\beta E)$ with respect to $p_z$ then why do we treat $\beta$ and $\gamma$ as constants?
Edit: Thanks for the comments and answers everyone. I now understand what is happening.
 A: We have two reference frames, $F$ and $F'$, related by a Lorentz transformation characterized by $\beta$ and $v$.
Imagine we have a physical object$^\star$ moving with z-momentum $p_z$ and energy $E$ in frame $F$, and $p_z', E'$ in frame $F'$, with $p_z'=\gamma(p_z-\beta E)$.
What we want to know is: if the particle is kicked by an infinitesimal amount, so that its z-momentum in the $F$ frame goes from $p_z$ to $p_z+dp_z$, then how does its z-momentum in the $F'$ frame change? The answer to this question is the derivative in the image you posted.
Note that in this scenario, $F$ and $F'$ are not changing. Only the momentum of the particle is changing, which we can describe in any frame we want. Therefore, we do not differentiate $v$ or $\beta$ because these characterize the relationship between $F$ and $F'$, both of which are being held fixed.
$^\star$ I simplified this a little bit by talking about a physical particle. The problem you are considering, mathematically, is a little more abstract because you are considering the transformation of a small volume in phase space. But you don't lose any physical content for in your question by associating this element of phase space with a particle with the same position and momentum.
