Hi,
There is a bug in simulating the categorical variables. Instead of simulating from the predicted probability distribution, the current code picks the class with the maximum probability. This was raised here originally in the R version. Kindly look into it.
CausalInference/gfoRmula#47 (comment)