The drying agents like P2O5 and CaO cannot be used to dry hydrogen chloride gas because:
Both P2O5 and CaO react with hydrogen chloride
Hydrogen chloride gas is dried by passing through conc. sulphuric acid. The other drying agents like phosphorous pentaoxide and quick lime cannot be used since they react with hydrogen chloride.
2P2O5+3HCl→POCl3+3HPO3CaO+2HCl→CaCl2+H2O