We present a tomographic measurement of the cross-correlation between thermal Sunyaev-Zeldovich (tSZ) maps from ${it Planck}$ and the Atacama Cosmology Telescope (ACT) and weak galaxy lensing shears measured during the first three years of observations of the Dark Energy Survey (DES Y3). This correlation is sensitive to the thermal energy in baryons over a wide redshift range, and is therefore a powerful probe of astrophysical feedback. We detect the correlation at a statistical significance of $21sigma$, the highest significance to date. We examine the tSZ maps for potential contaminants, including cosmic infrared background (CIB) and radio sources, finding that CIB has a substantial impact on our measurements and must be taken into account in our analysis. We use the cross-correlation measurements to test different feedback models. In particular, we model the tSZ using several different pressure profile models calibrated against hydrodynamical simulations. Our analysis marginalises over redshift uncertainties, shear calibration biases, and intrinsic alignment effects. We also marginalise over $Omega_{rm m}$ and $sigma_8$ using ${it Planck}$ or DES priors. We find that the data prefers the model with a low amplitude of the pressure profile at small scales, compatible with a scenario with strong AGN feedback and ejection of gas from the inner part of the halos. When using a more flexible model for the shear profile, constraints are weaker, and the data cannot discriminate between different baryonic prescriptions.