As long as a $30 IED will destroy a $100,000 robot this war can continue.
Most of that price is to pay for R&D, engineering, testing, certification. That doesn't get blown up with the robot. The money doesn't disappear down a black hole, it's circulating in the economy back home. Your personal stake in that robot cost you about 1/30th of a penny. Don't lose sleep over it.
Initially a single solid-state transistor cost $1,000 and only the military could afford them. The large volumes they bought dropped the price forever.
A soldier that gets blown up costs in the 7 figure range, not to mention the huge political cost. How often does a blown up robot even make the news?