The ruling comes amid the push by Trump’s Republican administration to keep Alina Habba as the acting U.S. attorney for New Jersey.