Shemiras Halashon Halachos

Hilchos Lashon Hara, chapter 3, section 1

The prohibition of lashon hara applies also to the truth, whether he speaks of the person in secret and is concerned lest it becomes revealed that he spoke of him, in which case he transgresses, "Cursed be he who strikes his fellow in secret," and whether he even feels that he would relate the lashon hara in front of the person spoken of. This is also forbidden and considered lashon hara. Speaking before him can be an even greater prohibition since besides the prohibition of lashon hara, he is behaving with brazenness and sometimes embarrasses the person to the extent that his face pales.

Hilchos Lashon Hara, chapter 3, section 2

When we sometimes find a leniency in Chazal that one may speak if one would not stop from speaking the lashon hara even before him, this deals with an ambiguous matter that can be understood as derogatory or otherwise, depending on how a person expresses himself when he speaks. Chazal say that if he would say such a thing before him, this proves that he does not intend to denigrate him since a person is generally embarrassed to shame someone to his face. But [if he would not speak it] before him, even if the derogatory interpretation is only dust of lashon hara, it is nonetheless forbidden.