I am using advi in stan to plot the posterior distribution. According to the variational inference method, it should be identical to a normal distribution, but the distribution I am getting is not normal. It might be because I am plotting the sample but is there a way to get the parameters of the normal distribution whose KL divergence we minimize?

ADVI approximates the posterior as a normal distribution when the parameters are transformed to unconstrained scale. Parameters with constraints will have non-normal ADVI distribution. For example, a parameter declared with `<lower=0>`

will have a log-normal distribution.

It is not possible to access the approximation directly, you have to work with samples only.