The way in which President Donald Trump’s administration held back money for the project “flagrantly violates federal law,” according to a Monday ruling.