Bet 2/3 on the flop instead of half.
Turn is good.
River is good.
He was on a draw and you were ahead, so you bet two streets for value, denying him a free card.
He called two streets without the proper odds
to do so (and without any implied odds because he didn't get anything when he hit). HE is the one leaking. You played it well.
All your money went in while ahead, and you didn't pay a single cent when behind. This is not a leak, this is your win rate. You won the hand.
Play this turn exactly the same way for 100 times, and you're winning over 80 of them. Poker is a long-term game. In the short term, you lost the hand because he hit his flush draw. In the long term, YOU WON!!!!