The speed of sound in a real gas is $C = \sqrt{ZkRT}$, where $C$ is the speed of sound in the gas, $k$ is adiabatic gas constant $={C_p}/{C_v}$, $R$ is the gas constant and $T$ is gas temperature in Kelvin and $Z$ is compressibility factor.
Suppose we compress a real gas in an isothermal process ($T=$ constant). By increasing the pressure, we have a denser gas, so I would expect the speed of sound to increase.
On the other hand, for $T=$ constant, according to $C = \sqrt{ZkRT}$, speed of sound is proportional to $\sqrt{Z}$. According to marked up region in diagram below ($Z$ vs ${P_r}$ for ${T_r}$: constant) as pressure increases, $Z$ decreases, which means speed of sound decreases ($C\alpha\sqrt{Z}$).
In other words, according to the formula above and the graph below, by increasing pressure (in the marked up region), speed of sound decreases, which is against common sense (denser gas should have higher speed of sound). How to solve this paradox?