For a simulation study I derived the posterior distribution of a parameter $\theta$ with data $D$ as $p(\theta|D)$. I can sample from the posterior, but there is no analytic expression. The posterior allows me to calculate the 95% credible intervals as the 2.5 and 97.5 percentile of a sampled Monte Carlo distribution. That is, I draw repeatedly from the posterior and then read off the quantiles.
I want to know whether the credible interval I calculated really has a 95% probability of covering the true value. The true value of $\theta$ is known as this is a simulation. So I sampled repeatedly (1000 times) data $D$ from a superpopulation and calculated the credible interval each time. It turned out that the credible interval only covered the true parameter in about 90% of the cases.
From here and here I believe I understand that the credible interval should indeed have 95% coverage of $\theta$ but in my case it does not have. Did I evaluate the coverage of my credible interval correctly? What are possible reasons why in my monte carlo simulation the coverage is not 95%?