Given a continuous random variable $X$ let $Z = F_X(X)$, where $F_X(s) = P(X \leq s)$. Then $P(Z \leq z) = z$ and we say that $Z$ is uniformly distributed.
Say we have another continuous random variable $Y$, which has a different distribution than $X$. Let $G = F_Y(Y)$ where $F_Y(s) = P(Y \leq s)$. $G$ is then also uniformly distributed.
Does this mean that $G$ and $Z$ have the same CDF? (I feel like I'm missing something super basic, haha). I'm asking this because my textbook says that if two random variables have the same CDF, then they have the same PDF, and I don't see how that could reconcile with the above.