If any of Philip IV's sons had a son of his own, we would have avoided the Hundred Years War, there is no question about it. You would need an incredible amount of bad luck for the HYW to still happen despite Philip IV having several grandsons.
The presence of grandsons could butterfly salic law but even by following male-preference primogeniture, the order of succession to Philippe IV would go like this:
Louis X the Quareller
son(s) of Louis X
daughter(s) of Louis X
Philippe V the Tall
son(s) of Philippe V
daughter(s) of Philippe V
Charles IV the Fair
son(s) of Charles IV
daughter(s) of Charles IV
Isabella, Queen of England
son(s) of Isabella
daughter(s) of Isabella
Charles of Valois
There are quite of lot people who would need to die before a potential successoral war between France and England. Or lucky marriages between the heirs of both crowns.
That being said, there could still be conflicts between France and England over Aquitaine/Guyenne, since the King of England was technically a vassal of the king of France for these lands.