It's hard to say without knowing whatever alternatives were available. Keeping Phil would have gone directly against the team's rebuild philosophy at the time, so that wasn't a viable option. This forced the team into trading a distressed asset, meaning other teams would be looking for a major discount, and at the time there weren't many teams looking for an expensive one-dimensional winger with a checkered history.
So overall I would say no, the Leafs didn't lose since it doesn't seem like there was a better alternative and the team took what appears to have been the best offer on the table. I don't think there are any acquisitions we could have changed our fate over the past 4 years.
But if this is a zero-sum, one winner one loser, scenario, then yes, Pittsburgh absolutely won that trade which would make us the loser.