mwi It depends on the kind of visa you have. There is mutual recognition of visas between Russia and Belarus, but this applies only to normal, paper visa, not electronic visa, for technical reasons. Using an electronic visa, your first stop should be the country which issued that visa. For the route you are planning as a Polish citizen, you would actually need a Russian visa. Flying to Minsk from Russia would then be allowed.
By the way, a common misunderstanding: there are no migration controls in Belarus when you leave or arrive in Minsk flying to or from Russia, BUT there are migration controls in Russia when you fly to or from Belarus! So in your case, you would be entering Russia twice. Not sure if the Russian electronic visa allows that.