It actually is a problem for her to be making political speeches like this at all. But that’s a separate issue. The dept heads aren’t designed to be politicking. They’re supposed to be domain experts who inform the political decisions of the executive. Which is why people had a problem with her appointment in the first place.