I assume you are talking about a 2 phase system of vapor in equilibrium with liquid. Strictly speaking, the term "vapor pressure" only applies to single-component systems. If there is a second component present, like air and water in a closed sealed container, then the equilibrium of each species is described by the partial molar free energy (or fugacity) of the species in the vapor as being equal to the partial molar free energy (or fugacity) of the same species in the liquid. Even in the case of water and air in a closed container at 1 bar (where air is regarded as insoluble), the partial molar free energy of the liquid water will be slightly different from its value in the single component species at the same temperature (Poynting correction). Even if the gas phase were ideal, such that the partial molar free energy of the water in the gas phase were the same as its value for pure water vapor at the same partial pressure, the effect of the higher pressure on the liquid water would slightly disturb the equilibrium and the partial pressure of the water vapor would differ from its value for a single component system.
If total pressure in the two-component system were high enough (i.e., higher air pressure), the partial molar free energy of the water in the gas phase would also be affected (say by the non-ideal interaction between the water vapor and the air), but not in the same way as the partial molar free energy of the liquid water changes. So here, even more strongly, the total pressure times the mole fraction of water vapor in the gas (which would typically be defined as the partial pressure of the water vapor for an ideal gas mixture) will not be equal to the equilibrium vapor pressure of water at the temperature of the system. With all this said, in practice, particularly for air and water, the effect can be expected to be pretty small.