The ideal gas law $pV=nRT$ is only valid for ideal gases, where interactions between molecules are negligible.
Here is a $pV$-diagram for R134a as a log-log plot:
At low densities, the isotherm at 200 C behaves like an ideal gas, a straight line with a slope of -1.
At higher densities, there are interactions. For temperatures below the critical point this leads to coexistence of liquid and vapor, with horizontal sections of the isotherms.