Any kind of material around antenna within half wavelength distance affects it's resonant frequency, directivity and efficiency.
This is because there is a skin effect. AC current flows not within wire but on their surface and the speed of that current depends on electromagnetic wave speed in the environment near the wire. Since different environment has different EM wave speed, different environment around antenna leads to change electrical length of antenna wires.
In other words, your antenna electrical length is different when it's placed in air and in oil environment. Usually antenna length is specified for vacuum environment (free space) which is very close to air environment. But if you place it in the oil enthronement, it's length will be different and as result resonant frequency will be different.
Even air around antenna affects it's resonant frequency, but EM wave speed in the air is almost the same as for vacuum, so the difference is too small and can be ignored. But for other environment (such as water, oil, soil and other) EM wave speed can be very different so it leads to a high change of antenna resonant frequency.
There is also reflection effect on the border between materials with different EM wave speed (for example air and oil), it leads to adding reactance (L or C), so the resonant frequency of antenna will be changed.
It's hard to take into account all effects in the mind, because this is very complicated process, so it's better to use some antenna simulator software to see how different material and it's geometry configuration near antenna can affect antenna properties.