Enhanced confinement regimes with strong electron heating in the presence of flat or inverted safety factor profiles