In May, the Senate advanced a similar measure to force the president to end the prolonged conflict with Iran.