Well, if we prosecuted treason against a person for acting on behalf of a foreign power -- naming them as an Enemy of the United States -- it would be trivial for that power to interpret the prosecution itself as declaration of war. So be careful what you wish for.
Here, here's a related article by a law professor at my alma mater: https://www.washingtonpost.com/opinions/five-myths-about-tre...
Is that reading backed up anywhere legally, that the definition of an Enemy only applies during a state of war from an official declaration of war?