Aims. The hot phase of the circumgalactic medium (CGM) allows us to probe the inflow and outflow of gas responsible for dictating the evolution of a galaxy's structure. Studying the hot CGM sheds light on the physical properties of the gas phase of the baryons, which is crucial to inform and constrain simulation models. With the recent advances in observational measurements probing the hot CGM in X-rays and thermal Sunyaev-Zeldovich (tSZ), we have a new avenue for widening our knowledge of gas physics and feedback. Methods. In this paper, we use the TNG300 hydrodynamical simulations to build a fully self-consistent forward model for the hot CGM. In order to do that, we construct a lightcone and generate mock X-ray observations of the large-scale structure. We quantify the main projection effects impacting CGM measurements, namely the locally correlated large-scale structure in X-rays and the effect due to satellite galaxies misclassified as centrals, which affect the measured hot CGM galactocentric profiles in stacking experiments. Results. We present an analytical model that describes the intrinsic X-ray surface brightness profiles of halos across the stellar and halo mass bins. The increasing stellar mass bins result in decreasing values of beta, the exponent quantifying the slope of the intrinsic galactocentric profiles. We measure the effect of misclassified centrals in stacking experiments for three stellar mass bins 10(10.5-11) M-circle dot, 10(11-11.25) M-circle dot, and 10(11.25-11.5) M-circle dot. We find that the contaminating effect of the misclassified centrals on the stacked profiles increases when the stellar mass decreases. When stacking galaxies of Milky-Way-like stellar mass, this effect is dominant already at a low level of contamination: in particular, misclassified centrals contributing 30%, 10%, or 1% of a sample dominate the measured surface brightness profile at radii >= 0.11xR(500c), >= 0.24xR(500c), and >= 1.04xR(500c), respectively.