That's true that Buffon's teams were better known for their defensive ability compared to Casilla's Real Madrid teams.
That being said, Buffon had a very good Juve team from 2001(when he joined) til 2006( the Calciopoli scandal).
After that, Juventus weren't an elite side till around 2015. Casillas had better teams in front of him for most of his club career allowing him to get more trophies.