I have seen these statements. They can be confusing. They can also be mis-leading. In trying to avoid giving the fuller details, these statements sometimes hinder the ability to make valid projections later.
The term substance generally means a particular kind of matter with uniform properties. In chemistry, a substance is matter that has a specific composition and specific properties.
Here is the first lesson. Every pure compound is a substance. But not every substance is a (single) compound.
Air is NOT a pure compound. So, it cannot be classed as a substance by default. Air (as a single gas phase) is ONLY a substance by the fact that it has a specific uniform composition and specific uniform properties throughout. What are the specifics? Air (as a gas phase) contains a well-defined set of chemical compounds (nitrogen, oxygen, and so on) in well-defined relative concentrations (79 mol%, 21 mol%, and so on) mixed uniformly as a single gas-phase solution (not as multi-phase system).
What then is air as a "pure" substance as opposed to simply calling air a substance? The inference by using the word "pure" is that, as long as the composition and properties of (gas phase) air are uniform throughout, we may as well just believe that air is composed of "air molecules”. We do not need to know that air is truly composed of nitrogen molecules and oxygen molecules (and water molecules and argon atoms and ...). We never get that far in our treatment of air to discover where it makes a difference.
Now the second lesson. Even when the gas of a pure compound forms a liquid, we still regard the gas as a substance. In fact, we also regard the pure liquid as a substance. Why? Because the default is that pure compounds are substances. The term "substance" for pure compounds is not tied to the phase state of the compound.
But, even though each phase is itself a substance, we never say is that the entire two phase system is a substance. Why not? Because anything that has more than one phase by definition does not have uniform properties throughout the entire system. In particular, at a fundamental (molecular) level, either the chemistry or the structure (or both) within each of the various phases must be different from any of the other phases in order to have more than one phase.
By example, we do not call a system that contains a two phase mixture of PURE water vapor + PURE liquid water a substance. With this same reasoning, we cannot call a two phase system of gas phase air + liquid phase air a substance either.
To be clear, in a multi-phase system, each phase is by itself a substance, so long as that phase retains its own uniform composition and properties throughout.
What about composition? Why is that notion even raised?
We need to explore what happens to air when it forms a liquid. Because air is not a pure compound, it will not form a pure compound as a liquid. In fact, the liquid state of air will naturally have a different composition of the components that it contains. The normal boiling point of nitrogen is -320 $^o$F and of oxygen is -297 $^o$F. As we lower the temperature on gaseous air, the oxygen will prefer to form liquid before the nitrogen. So, the liquid phase that forms will be richer in oxygen than in nitrogen. At any temperature between -297 $^o$F and -320 $^o$F, the equilibrium state of the two phase system will have a liquid that is richer in oxygen than the gas phase state.
Does this composition difference make air no longer a compound?
This finding does NOT make the GAS PHASE AIR no longer a substance by itself. This finding also does NOT make the LIQUID PHASE AIR no longer a substance by itself. Both phases by themselves completely follow the guidelines for uniform composition and properties throughout.
So, part of the confusion is due to a redundancy. Simply put, we do not call a SYSTEM of gas + liquid a substance because no SYSTEM that contains more than one phase ever has uniform properties throughout. Regardless of whether the system contains pure water, pure benzene, or ... "pure" air, a multi-phase system is never a substance.
Return now to the ending phrase "the liquid would have a different composition from the gas phase, and the system would (therefore) no longer be considered a pure substance". This phrase is conceptually misleading if not wrong. It projects to you that the reason to believe that a system of gas phase air + liquid phase air is no longer a substance is because the compositions in the two phases are different from each other. The real reason is simply because you have more than one phase in the system. There is absolutely no reason to have to talk about composition.
In summary, there is a lot that is hidden in the simplified statements that you quote. They make life so much easier to solve homework problems (oh ... this system has gas phase air ... it is a pure substance ... there is an ideal equation for this case). They make life so much harder when it comes time to solve problems to the real world (oh ... my gas phase air pump is experiencing cavitation ... why would a "pure substance" cause such a thing).