This has come up before:
- Incorrect formula for correlation matrix transform
- LKJ inverse transform for correlation matrices (incorrect documentation?)
I think I even said I would get to the bottom of it in the first link (I definitely did not and then forgot about it, whoops). I am more confident in the formulae in 10.12: 10.12 Cholesky factors of correlation matrices | Stan Reference Manual, and would then take the crossproduct of the result to get a correlation matrix.