The vote failed after two Republicans withdrew their previous support under intense pressure from the Trump administration.