No, that's not how it works.
A department that's not recognized by law is not a department, period. Any time a department wants to do something, it is asked, where does your department appear in law? And if they can't point to law, the department effectively doesn't exist.
This isn't about being above the law or below the law. The law just doesn't care about departments that aren't in it.
I believe even Trump's people themselves have recognized this and admitted that DOGE isn't a real department.
A president simply has no choice in this.