The key is the proximity of the Moon to the Earth compared to the Sun.
Explanation:
The Moon is closer to the Earth than to the Sun, and the formula for the gravitational force contains in the denominator the square of the distance in between the interacting objects. Such is going to be translated into a much larger denominator for the case of the Sun, than for the case of the Earth. A larger value in the denominators will produce a much smaller force
The gravitational influence of the Sun can also be observed in more subtle orbit displacements for example during Sun eclipses when the moon is clearly in between the sun and the Earth.