Nope, the president has the power over federal agencies. You might argue this wouldn't be something he could do if he didn't specifically campaign on this issue, which is usually where the line is drawn. But the fact that he DID campaign on this, and that the president DOES have the power to such a thing, means he can and has every right to.
Again, Congress has the power to allocate spending. If you think the president, or Elon Musk, has absolute power over the entire federal government, then, well, there’s a word for that. You think he’s a dictator.