It's not that simple. A single person is not required to agree with what their country is doing, and probably can do little. Unless something can be attached to their name, like a tweet saying "all ukrainians shall die" or spreading modern russian ideology, it's wrong to punish. It's prejudice, it's discrimination, no different than not letting somebody into a restaurant just because of their race. Were all germans guilty because of Hitler?
If a German, during WW2, or heck even WW1, submitted an article to a British journal on improvements to industrial equipment, and did so on BASF letterhead and with a correspondence address to BASF's headquarters, companies in the allied nations would be right to think twice before implementing those improvements, or even making comments on those improvements.
Sorry, but I can't believe you've just compared discrimination against someone going into a restaurant due to their race to Hitler/the Holocaust. Like, c'mon.
What's that rule that every argument on the Internet eventually devolves into something about the Holocaust or Hitler or something like that?