Unfortunately, I've seen it several times in other hands, which didn't happen to me... I looked back and didn't understand why the game decided when the loser was the one with the better hand.
Pokerstars is an official site, so I doubt that their software has serious bugs in the hand rankings, which is a crucial concept of poker, so I genuinely assume you may have some misunderstandings. Happens to the best of us sometimes.
As suggested, you may request some hands manually in the software and share them here, so we can study together. 🙂
There were different colors, anyway, in the case of a match of three, the same color cannot be taken into account.
I see. If the board didn't have at least 3 cards of the same colour, then there is no flush possible indeed.
Another guess is that you had a 5 as hole card combined with another card and the board read something like
545xx
And your opponent had two 4s in his hole cards?
Then he has a full house and you only have three of a kind and a Full House beats trips. 🙂