Hilchos Lashon Hara chapter 5, section 1
Just as it is forbidden to shame a person about things between them and Hashem, it is also forbidden to shame them about things between people – even if the story is true.
For example: a person sees someone ask another to lend money or do some other favor, and the other refuses. If the person then goes and speaks badly about the one who refused, this is real lashon hara by the basic halacha. This is true even if they saw it themselves, and know that the person could have done the favor and only refused because of a bad nature.
If the favor was refused to the speaker themselves, they also break "Do not bear a grudge" (lo titor). And if they tell the story to get revenge, they also break "Do not take revenge" (lo tikom).