In the proof for the Cramer Rao Inequality, my book writes:
$$E[\hat{\theta}] = \int{\hat{\theta}(\textbf{x})L(\theta;\textbf{x})d\textbf{x}=\theta}$$
Then differentiating both sides of this equation with respect to $\theta$, and interchanging the order of integration and differentiation, gives
$$\int\hat{\theta}\frac{\delta L}{\delta \theta}d \textbf{x}=1$$
This is because $\hat{\theta}$ does not depend on $\theta$.
But why does $\hat{\theta}$ not depend on $\theta$? Because i think $\hat{\theta}$ depends on the random sample which depends on $\theta$
The estimator is a function of the random variables $x_i$, which means the estimator is itself a random variable. In a frequentist framework the parameter, however, is not a random variable; it is just a fixed but unknown constant.
It is in this sense that $\hat{\theta}$ is not a function of $\theta$ (even though you are right that each $x_i$ “depends on” $\theta$ in the sense that the $x_i$ are drawn from a distribution with parameter $\theta$).
For the sake of concreteness, say $X$ has a normal distribution with parameters $\mu$ and $\sigma$. Say we draw an iid sample of size $n$ to estimate $\mu$. Then our estimator, the sample mean $\bar{x}=1/n\Sigma x_i$, is a function of the $x_i$, which are each identically distributed $N(\mu, \sigma^2)$ distributions, but it is not a function of $\mu$ or $\sigma$.
This can all be made absolutely precise in the formalism of measure theory, where the estimator is a measurable function, but the parameters describe the underlying probability measure itself.