Just want to document the case:
I have just trapped in all the traps described by @rpgoldman when trying to use an ordered transform and sampling from the prior predictive. It took some time of inspection to notice that it’s not applied when sampling the pp. (There being forward and backward methods in the source code added to the confusion.). I should note that I’m still on PyMC v4 and not sure if the behavior has changed in v5.