Pyro can do this for certain technical reasons:
However: variational inference doesn't actually work well with complex dynamic structure, because the variational approximations themselves are usually "smooth" in ways that a correct posterior of a dynamic model would not be.
In other words: although it would not be hard to create a syntax / notation for expressing dynamic models, the reason there is not yet a standard syntax/notation for that is that the methods for fitting such models, or, to the same purpose, sampling from their posterior... are still mostly lacking.
It seems to me this is a fundamentally hard problem overall, so I don't expect it will be fully solved even in the next 5-10 years, but I do expect to see significant progress. PPLs are getting better by leaps and bounds now, and I'd expect something like Gen.jl to usefully cover at least some special cases of dynamic models, and to have a clearer syntax for at least talking about those models it still struggles to cover, in even just the 1-2 year time frame.
One phrase to look for is "open-world" or "open-universe", in which it isn't known which objects exist. See e.g. this paper. That said, this is still in the realm of PPLs -- to my knowledge this was developed for BLOG, and then spread to other PPLs.
Assuming you want to find the evidence and compare between models PPL is probably all that is out there. Without the evidence step, the options are potentially more open.
I've seen several examples that I would have naively expected to be a "change of the causal structure," which were treated by just adding more links to the static causal structure. So, apologies, I can only give evidence that what you're looking for is rare.
I'm looking for any work done involving causal models with dynamic structure, i.e. some variables in the model determine the structure of other parts of the model.
I know some probabilistic programming languages support dynamic structure (e.g. the pyro docs mention it directly at one point). And of course one can always just embed the dynamic structure in a static structure (i.e. a model of any general-purpose computer), although that's messy enough that I'd expect it to create other problems.
I haven't found much by quick googling (too many irrelevant things use similar terms) so I'd appreciate any pointers at all. At this point I've found basically-zero directly relevant work other than PPLs, and I don't even know of any standard notation.