The vote on a Democratic resolution to rein in Mr. Trump's authority to strike Iran was 212-212, falling just short of a majority.