The intergalactic medium transmission towards z greater than or similar to 4 galaxies with VANDELS and the impact of dust attenuation