  We study the interstellar medium (ISM) properties as a function of the
molecular gas size for 77 infrared-selected galaxies at $z \sim 1.3$. Molecular
gas sizes are measured on ALMA images that combine CO(2-1), CO(5-4) and
underlying continuum observations, and include CO(4-3), CO(7-6)+[CI]($^3
P_2-^3P_1$), [CI]($^3 P_1-^3P_0$) observations for a subset of the sample. The
$\gtrsim 46 \%$ of our galaxies have a compact molecular gas reservoir, and lie
below the optical disks mass-size relation. Compact galaxies on and above the
main sequence have higher CO excitation and star formation efficiency than
galaxies with extended molecular gas reservoirs, as traced by CO(5-4)/CO(2-1)
and CO(2-1)/$L_{\rm IR, SF}$ ratios. Average CO+[CI] spectral line energy
distributions indicate higher excitation in compacts relative to extended
sources. Using CO(2-1) and dust masses as molecular gas mass tracers, and
conversion factors tailored to their ISM conditions, we measure lower gas
fractions in compact main-sequence galaxies compared to extended sources. We
suggest that the sub-millimetre compactness, defined as the ratio between the
molecular gas and the stellar size, is an unavoidable information to be used
with the main sequence offset to describe the ISM properties of galaxies, at
least above $M_{\star} \geqslant 10^{10.6}$ M$_{\odot}$, where our observations
fully probe the main sequence scatter. Our results are consistent with mergers
driving the gas in the nuclear regions, enhancing the CO excitation and star
formation efficiency. Compact main-sequence galaxies are consistent with being
an early post-starburst population following a merger-driven starburst episode,
stressing the important role of mergers in the evolution of massive galaxies.
