Democratic attorneys general from across the country sued the first Trump administration dozens of times — and often won.