A federal judge has rejected a claim by the Trump administration that it is barred from funding a consumer watchdog agency.