In a GLMM model 2 predictors (covariates) correlate positively but affect the response with opposite relationships. Is it possibile? I am checking the results of my GLMM model
full = glmmTMB(Shannon ~ z.maternalGC.earlygest +
         z.maternalGC.mean.lact + 
         z.GCsample +
         sex + age_cat + season + group + 
         (1|individual_id),
         data = xdata.field)

the response is a microbial diversity measure from fecal samples and the z-transformed covariates are measures of stress. Now, from previous analyses I know that 2 covariates: z.maternalGC.earlygest and z.GCsample correlate positively and I can also easily see it when I just plot the 2 covariates from the same database, one against each other.
ggplot(xdata.field, aes(x=z.maternalGC_earlygest, y=z.GCsample)) +
  geom_point() +
  geom_smooth(method="glm" , color="red", fill="#69b3a2", se=TRUE)

So far everything makes sense. However, when I run summary(full) and check the results of my GLMM z.maternalGC.earlygest has a positive effect while z.GCsample has a negative one. How is it possible that 2 covariates positively correlated have an opposite effect on my response? Does it make sense statistically speaking? Could somebody explain to me if that's normal and how is it possible? I mean, I ran that correlation and I see a positive effect so I am expecting that if one variable has an effect, the other one may have no effect or the same direction effect, not the opposite...

Sure!
library(MASS)
set.seed(2021)
N <- 1000
mu <- c(0, 0)
S <- matrix(c(1, 0.9, 0.9, 1), 2, 2)
X <- MASS::mvrnorm(N, mu, S)
x1 <- X[, 1]
x2 <- X[, 2]
e <- rnorm(N)
y_hat <- 1 + x1 - x2
y <- y_hat + e
L <- lm(y ~ x1 + x2)
summary(L)
cor(x1, x2)

Here, the x1 and x2 variables have a strong positive correlation over $0.9$, yet their regression coefficients have opposite signs.
Just because increases in x1 tend to correspond to increases in x2 does not mean that both must correspond to increases in y. If you did a controlled study where you forced x1 to be constant while you varied x2, you would find y to change about $-1$ units for every one-unit change in x2.
