Shielding effect to valence electrons

As we know that the combined effect of attractive and repulsive force on valence electrons results as an attraction of the valence electrons by the nucleus which by the way is obvious

• But i have a difficulty understanding it happens as electrostatic force >>>>> gravitational force and electrostatic force is inversely proportional to the square of the distance between the charges ,therefore as the inner electrons is close to the valence electrons they should repel it with much greater force than the nucleus attracting it (as proton and electron have same magnitude of charge).

-It's the problem i have.Lemme know if it has something to do with vector addition of forces or something else.

I forgot to mention this point earlier that when an element has a half-filled or full-filled (valence) sub-shell, the energy required to remove an electron from there suddenly increases due to stability reasons, due to symmetry and exchange energy in case of half-filled sub-shells or because of spin-pairing in the case of full-filled sub-shells. The effect is more pronounced in case of full-filled sub-shells like in group $$12$$ (fully filled d subshell) and group $$18$$ (fully filled p subshell) elements.