It should be built where it makes the most sense from an engineering and topographical point of view.
The further back the fence is the more territory will become a “No Man’s Land”. At one time in Texas, the land between the Nueces River and the Rio Grande River was just such a place. Both Mexico and Texas (and later the U.S.) claimed it.
The Texas Rangers took decades and the lives of countless Mexican Bandidos (and others) to basically reconquer this area.
Today, we can no longer use the same tactics as the Rangers did. We’re too PC.