A non-converging path model with categorical observed variables is often a data or estimation problem rather than a syntax problem. I would diagnose it before changing convergence tolerances.
First, inspect the marginal frequencies and the relevant 2 × 2 tables. A zero or very small cell, an almost constant variable, or an almost deterministic relationship can make a tetrachoric correlation approach ±1. The resulting correlation matrix may be non-positive definite, and the model may fail even when it is identified on paper.
Because Y and Y2 are binary endogenous variables, declare them explicitly and use an ordinal estimator:
fit <- lavaan::sem(
model,
data = data,
ordered = c("Y", "Y2"),
estimator = "WLSMV"
)
Do not use the ordinary nonparametric bootstrap with WLSMV. Also note that theta parameterisation will not solve separation, sparse cells, or an almost deterministic Y → Y2 relationship.
I would then build the model in stages: fit the M regression, fit Y on X and M, inspect the Y/Y2 table, add Y2, and only then add defined indirect effects. Check the exact warnings, convergence status, coverage, extreme thresholds, large standard errors, and non-positive-definite matrices. If Y almost perfectly predicts Y2, the problem is in the information available in the data, not the iteration limit.
Finally, a*b in this model is an indirect effect on the latent-response/probit scale. It should not automatically be interpreted as a probability-scale causal indirect effect. If you share the exact warning, sample size, marginal counts, Y × Y2 table and model output, the failing part can be diagnosed more precisely.