Illegal operation: {real affine} - {invalid}

Perhaps you are not showing the iteration prior to the Invalid. i am guessing that failed.

Anyhow, you should use CVX 2.2 with Mosek 9.x if you can. Otherwise, follow the directions in CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions