In tokamaks, helium plasmas are regularly observed to have significantly lower confinement than deuterium plasmas. For the first time, in the ASDEX Upgrade tokamak the confinement of helium plasmas is experimentally demonstrated to increase with increasing fraction of electron heating, reaching values comparable to those of the deuterium plasmas. Nonlinear electromagnetic gyrokinetic simulations show that the different impact of zonal flows in regulating the core turbulence in the limit of low electron heating in D and He plasmas breaks the gyro-Bohm scaling of transport, leading to higher levels of transport in He. The thermal coupling between electrons and ions and stronger destabilization of electron temperature gradient modes lead to reduced confinement at the edge of He plasmas.