You need an emulsifier to keep the pesto together if there's an aqueous phase (from your post I'm not sure there is ) There's lists of food grade emulsifiers that sound like chemicals, but are just derivatives of fat.
I believe more food sounding things like tartaric acid or phospholipids e.g. Lecithin will do it too.
Not sure if xanthan works in a purely oil liquid.