He who controls the spice controls the universe. The lesson of the Ukraine war is that good people should not be dependent on bad people for necessities. If boycotting Russian oil is too expensive, then we should not be dependent on Russian oil, because Russia is run by bad people.
If we learn to value self-sufficiency as an economic good, maybe the comparative advantage math will change, and trading with the enemy won't seem so advantageous.