Constitutionally, they can protect the borders - it's part of protecting the nation.  I have no idea when or where the idea came in that the military can't protect the country from foreign invaders, but I do know the Democrats love having a border patrol instead, with rifles and no ammo (it's all for show anyway), and laws that protect the invaders and punish anyway who stops them.  It's a very strange situation - makes me wonder if maybe the entire Democrat party is full of traitors, or foreign invaders like the proverbial Trojan Horse.