As an example, a problem from the book Numerical solutions of Partial Differential Equations: Finite difference methods by G.D. Smith.
The PDE: $$ \frac{\partial{U}}{\partial{x}} + \frac{x}{\sqrt{U}}\frac{\partial{U}}{\partial{y}} = 2x $$
With boundary condition $U(x,0) = 0$
I have some basic understanding of how to solve this: $$ dx = \frac{\sqrt{U}}{x}dy = \frac{dU}{2x}$$
This yields $U = x^2+ Const_X$. For the characteristic going through $(x_R,0)$, we get $Const_X = -x_r^2$ since at $y=0$, $U=0$
We can also get: $$ \frac{dy}{dU} = \frac{1}{2\sqrt{U}} \to y= \sqrt{U}$$
(The additional constant can be shown to be 0, since for $y=0$, $U=0$)
Giving us the characteristic curve $x^2-y^2 = x_R^2$
But when you plug $U = x^2 -x_r^2$ back to the PDE, you get that along this characteristic, $\frac{x}{\sqrt{U}}\frac{\partial{U}}{\partial{y}} = 0$ ... Which contradicts $\sqrt{U} = y$ along the very same curve.
Given how little explanation was given in class for this method, I would've assumed I made a wrong assumption somewhere, except this is the exact solution given in the book (3rd edition, so if it was wrong, I'd assume someone would've figured it out by then)
You obtained correctly a first family of characteristic curves : $$x^2-U=c_1$$ A second family of characteristic curves is : $$y-\sqrt{U}=c_2$$ The general solution is obtained on the form of implicit equation : $$y-\sqrt{U}=F(x^2-U) \tag 1$$ where $F$ is an arbitrary function.
Condition :
$U(x,0)=0=0-\sqrt{0}=F(x^2-0)\quad\implies\quad F=$constant function $=0$.
Putting this function into equation $(1)$ leads to the solution : $\quad y-\sqrt{U}=0\quad\implies\quad U(x,y)=y^2$
So, the solution satisfying the PDE and the boundary condition is a function of $y$ only : $$U(x,y)=y^2$$
Final checking :
$U_x=0$ and $U_y=2y\quad;\quad U_x+\frac{x}{\sqrt{U}}U_y=0+\frac{x}{y}2y=2x\quad$ is OK.
and the condition $U(x,0)=0^2=0\quad$ is satisfied.
NOTE IN ADDITION :
Another approach to answer to the question : $$ \frac{\partial{U}}{\partial{x}} + \frac{x}{\sqrt{U}}\frac{\partial{U}}{\partial{y}} = 2x $$ The change of function and variable : $\quad\begin{cases}X=x^2\\ \sqrt{U(x,y)}=V(X,y) \end{cases}\quad$ leads to : $$ V\frac{\partial{V}}{\partial{X}} + \frac{\partial{V}}{\partial{y}} = 1 $$ This a well-known Burger's equation with inhomogeneous RHS. The literature is extensive about these kind of equations, as well as a lot of questions in StackExchange. For example : Confused about Burger's Equation with an inhomogeneous RHS I hope that studying this topic of Burger's equations with examples will clarify and make you aware that there is no contradiction.