Does the light double slit experiment work equally regardless of it being done in a vacuum or a medium (gas or liquid)?
Yes. Light travels quite well in a vacuum.
Assuming the equipment is not harmed by being in a vacuum, or by being exposed to the medium.
The only quirk will be that, in a medium, the speed of light is lower. That means that the wavelength is different. (Homework: By how much?) So the pattern you observe will have different distance between the peaks. So if you did it in air (with an index of fraction only slightly bigger than 1) and then you filled the apparatus with water (index of refraction about 1.33) you would expect the space between the bright bands to change. (Continued homework: Which way and by how much?)