How to keep dimensions in a posterior predictive sample?

When you call sample_posterior_predictive(), you are asking for new, credible values for any observed variables in your model. You have a single observed variable in your mode, event_count, which has dimension, obs_id. So when you ask for new values of event_count, they also have dimension obs_id.

I may be misunderstanding, but it sounds like you are looking for values of mu, which you can get by investigating your posterior: trace.posterior["mu"]. If that isn’t what you want, then I may need more information about what exactly you are looking for.