Proving that residuals from logistic regression are orthogonal to the predictions I am stuck on proving that residuals from logistic regression are orthogonal to the predictions.
However, I am able to prove that residuals are orthogonal to the predictors since  score vector ( vector of first derivatives of the log-likelihood with respect to the parameter $\beta$) is
$\nabla_\beta l(\beta;y,X)= \sum_{i=1}^{N}(y_i-g(x_i\beta ))x_i$, where $g(x)=\frac{1}{1+e^{-x}}$
and $\hat{\beta}=\underset{\beta}{\operatorname{argmax}}l(\beta;y,X)$ (i.e. it is the value that $\nabla_\beta l(\hat{\beta};y,X) = 0$).
Any advice on how I can proceed?
Thank you in advance for your help!

The way I see it, this is false, and I constructed a counterexample via simulation.
set.seed(2021)
N <- 100                           # Sample size
x <- runif(N, -2, 2)               # predictor
z <- x                             # Linear combination of predictors
pr <- 1/(1 + exp(-z))              # "True" conditional probability
y <- rbinom(N, 1, pr)              # response
L <- glm(y ~ x, family = binomial) # Logistic regression
preds <- 1/(1 + exp(-predict(L)))  # predictions
resids <- y - preds                # residuals
sum(preds * resids)                # inner product

I get the inner product of the predictions and residuals of $0.238$, meaning that the predictions and residuals are not orthogonal.
Given that the link function makes a logistic regression nonlinear, this is not surprising.
