Consider three continuous random variables $X$, $Y$, and $Z$. $X$ and $Y$ are conditionally independent given $Z$. What's wrong with the following derivation?
$$ f(x|y) = \int f(x|y,z)f(z) dz = \int f(x|y)f(z) dz = f(x) $$
$X$ and $Y$ are conditionally independent given $Z$, one way that this can be translated is
$$f(x|y,z) = f(x|z)$$
this means that by knowing $Z$, then the $Y$ has nothing to inform about $X$.
Based on that when you calculate the integral you have
$$f(x|y)=\int f(x,z|y)dz = \int \frac{f(x,y,z)}{f(y)}\frac{f(z,y)}{f(z,y)}dz = \int f(x|y,z)f(z|y)dz = \int f(x|z)f(z|y)dz \neq f(x)$$