The Republican president put pressure on party members who had supported it, causing two senators to change course, dooming the resolution.