You can specify var_names=["mu", "y_hat"] to get both y and the deterministic in sample_posterior_predictive
var_names=["mu", "y_hat"]
sample_posterior_predictive