If X lies about Y to Z.

But X reaching out to Y to tell him that he lied about him could result in bad consequences (drama etc…) is it obligatory to reach out?

No he should not cause a problem with him. In this case, X should offer good deeds on behalf of Y and ask Allah for forgiveness for himself and Y.
Now if he said a false statement about Y to Z, he must go to Z and clear it up and tell him that what he had said to him was not true.