Does it matter under what flag, though? As long as they are legally registered it shouldn't. TBH ships are usually registered in all sorts of shady countries.
Also if a group of countries declares sanctions, it doesn't allow them to stop the ships in international waters, does it?