This is because of the high density of HF in the gas phase as a result of hydrogen bonding between the molecules.
According to the ideal gas equation PV = nRT
PV = (m/M)RT where m is the mass of the gas and M is the molecular mass
PM = (m/V)RT
PM = dRT density d = mass/volume or m/V
Molecular mass M is directly proportional to the density d
You can see that a higher value of density will result in a higher molecular mass. Therefore, the molecular mass obtained by the above equation is much higher than that calculated by the molecular formula.