How to ensure walls will align?

So I'm trying to work on making more organic looking fortress walls - things that align with the landscape a bit, etc. You can see an example below. I'm trying to follow the contours of the island I'm on here a bit. And later, I'd like to be able to organically expand a wlal a bit to encompass more territory as it makes.

But no matte what I do, it always results in a misalignment. A couple examples are below.

I imagine there's some (probably extremely basic) geometric rule that I'm not seeing that would ensure alignment but...

Photo of "Organic" Wall that follows natural terrain lines, rather than just a rigid square outline.:

https://preview.redd.it/5a83atgp5xce1.png?width=2314&format=png&auto=webp&s=bee56656dd0c093efed2ecc15f8105b126c6433d

Examples of Misalignment:

https://preview.redd.it/42apk7166xce1.png?width=1673&format=png&auto=webp&s=42cc98049c12c6c439cbc0200917b5345cf267d6

https://preview.redd.it/wpgcjh6w6xce1.png?width=1497&format=png&auto=webp&s=c5240de5e3699d42dc78e48bbead7871f15a5a04