The mayor of Los Angeles has emerged as a leading voice of the city’s resistance to the Trump administration after facing criticism for her handling of the wildfires.