Courts thwart Trump’s bid to enact hard-line immigration agenda as Congress dithers