He didn't just leave him. He deceived him and drugged him before he left. Samyeong became his whole world, knowingly too... And then after realizing that Chang-geon can't truly live without him, he leaves.
It's kind of twisted in his own way because he kept making CG more and more obsessed. He made him rely on him emotionally, physically etc etc... And then just dumps and leaves him. He went on to have a happy marriage after essentially leaving CG in a living nightmare and hell (the palace with everyone that hates him).
CG was willing to let him go... But Samyeong didn't even invite him to his wedding... That's fucked especially after all those years of being friends.
So now that he got what he wished for... When he tried to run away but got caught, he had dreams of being pleasured by CG. Also, Samyeong kept telling CG that they live in different nature's and doesn't want him to fall into deeper depravity. But... It also could be him, most likely, putting it kindly that he doesn't want to be with him.
I don't think Samyeong was only kidding when I when he said in chapter 29 that he was embarrassed that he enjoyed his affections. Even if he felt compelled to say it, I don't think it was all a lie.
Though he did all of these, by no means that makes it right that he was treated so awfully in S1.

So...he just kind of losed it? But it's kind of understandable, I mean, MC was everything ML had and when he left maybe he had an existential crisis idk. I knew I had to let this marinate