Those who build walls in the desert often die on them. As Saddam's army learned -- or didn't actually, given how the second war with the US went.
Again, walls are useful for certain limited applications. But they are utterly impractical over thousands of miles. Your assets become fixed, inflexible, unable to adapt, and if bypassed they're useless.
You will NEVER get a return on your investment.
If you have to have eyes on the border ANYWAY
if you have to patrol the entire length in real time ANYWAY
if you have to monitor the cameras and sensors and drones ANYWAY
if you have to counter any breach anywhere anytime ANYWAY
THEN YOU DON'T NEED A PHYSICAL WALL.