Dozens of Republicans defied Trump and tech billionaire Elon Musk by joining Democrats to reject a revised spending bill.