The Trump administration cannot withhold federal emergency funding from Illinois because of its immigration laws, a judge ruled.