Ahh ha, there's where the rub is.
The issue of penalties applied to federal agents is ancillary to the issue. Tennessee and Montana have no penalties, they simply state federal gun laws do not apply per the commerce clause - and I doubt you'll find a court that agrees that it does. If the feds could invoke the commerce clause freely without fear of the courts, then the courts wouldn't have thrown out the "gun free zones" non-sense.
While the courts will likely side with the feds on the issue of arresting and punishing federal agents, that's not what the issue is here.
No, the penalties are a completely ancillary issue.
The Commerce Clause does not mean what you or anyone else of normal reading abilities would think it means, thanks to the SCOTUS decisions starting back in the New Deal. SCOTUS would have to drastically re-interpret their existing Commerce Clause case law to get this to come out the way you think it will, and I'm sure they're just dying to do that over issues like roll-your-own fully automatic weapons and no FBI background checks, it's such an attractive issue after all, right up there with saving the whales. Seriously, you're not well-informed about Commerce Clause SCOTUS precedent and you need to read up on this before possibly getting yourself or someone you've been talking to in real trouble on this topic.
The kind of case FGL is referring to would include
Darby, which is one of the New Deal cases the Feds
WON, subjecting farmers to Government crop restrictions for growing crops which were intended to be consumed
on their own farms. SCOTUS has pulled back from that extreme position on the Commerce Clause a wee bit since then, but rally most of the easing actually came from Federal regulation itself slacking off, rather than because of any fundamental re-think about overreaching in the past on the part of the Federal courts.
And BSS, the shooter would very probably be prosecuted in Federal court, there is no Federal murder statute but there is a Federal law against assaulting or killing a Federal agent, and with aggravating factors the penalty is in the same ballpark as murder. Whether self-defense would have any chance as a defense is pretty fact-dependent, but once the Federal agent identifies himself as such you would clearly be in the wrong to continue to escalate force instead of just surrendering the weapon and fighting it out in court later (Shoes nobody in their right mind would want to be in, since it would be heard in Federal court, not State). Basically to have a decent chance you would have to prove the Fed who got shot was exceeding all normal bounds even under Federal law. In Federal court, your chances are slim on avoiding prison for the shooting if you count on making a State-law based argument that you were innocent, just relying on the alleged-but-legally-debatable lawfulness of whatever underlying activity of yours the Fed was pursuing.
And as far Federal employees executing Federal duties go, I'd also add the common law of trespass is laughably less to rely upon than even State statutory law, which is why all the warlike posturing about census workers here is so remarkably stupid and childish.