To sustain global influence, Gulf economies recalibrate foreign investments as war drains revenues