If you want to be political in your profile, we generally allow that. Your profile is mostly yours (still subject to the Code of Conduct, obviously). If you want to protest governmental actions there have at it. We have users who still support Monica, for that matter. Politics are generally fine there.
If you don't want to help users who might be in Russia or have Russian usernames just don't help them. Nobody is forcing you to help anyone on the platform.
Where this crossed a line was a user said this in comments (this is my paraphrase to get the point across)
I don't like the actions of Russia currently. Your name and profile say you're from Russia. I could answer your question but, because I don't like your country, I won't, and neither should anyone else.
That's not acceptable, regardless of the subject. Maybe the country of Russia is engaged in evil currently (I certainly won't dispute that), but this is how you perpetuate the problem. Blaming a whole class of people for the actions of their country is unacceptable. If they had said the same things, but because of their race, religion, gender, etc. instead, I doubt we'd even be discussing whether or not to flag it.
The TL;DR here is saying (or implying) that we can't (or shouldn't) help someone on Stack Overflow because we don't like something about who the user is (or where they are located) is bigotry, and a clear violation of the Code of Conduct. Protest the country, not the user.