Can't paint or sculpt at certain locations

I was painting my landscape and out of nowhere the painting tool stopped moving where i wanted it to move. Its like it won’t go onto cliff surfaces. Its the same for sculpting tool. I closed the engine multiple times but when i load it back in it does the same. here is a gif of the problem.