Method for producing a semiconductor device being an insulated gate transistor, comprising, - providing a semiconductor body with a mask on a top side of the semiconductor body, wherein - at least two trenches laterally spaced from each other extend from the top side into the semiconductor body, wherein the trenches are filled with an electrically conductive material electrically isolated from the semiconductor body by an insulation layer applied on surfaces of the trenches and wherein the trenches are part of the insulated gate, - a functional portion of the semiconductor body is formed laterally adjacent to the two trenches and laterally between the two trenches, - in first sections overlapping with the trenches, the mask is thicker than in a second section overlapping with the functional portion; - forming a first region of a first conductivity type in the functional portion under the top side and adjacent to the trench, wherein forming the first region comprises implanting first-type dopants through the top side into the functional portion, wherein, for implanting the first-type dopants, - a directed implantation method is used in which, firstly, the implantation is done with a tilt angle α greater than 0° and then the implantation is done with a tilt angle α smaller than 0° so that the doping concentration of the first-type dopants in the functional portion is greater closer to the trenches than centrally between the trenches; characterized in that - after forming the first region, depositing a protection layer onto the mask, wherein the protection layer laterally extends over the trench and the functional portion; - forming a second region of a second conductivity type in the functional portion under the top side, wherein - forming the second region comprises implanting second-type dopants through the protection layer and through the top side into the functional portion, - at least a part of the first region adjacent to the trenches is preserved, - the protection layer is thinner in a section where the second region is to be formed than in a section where the first region is to be preserved, and - the deposition of the protection layer effectively forms a self-aligned mask, wherein the width of the preserved part of the first region is mainly controlled by the layer thickness of the protection layer. - providing a semiconductor body with a mask on a top side of the semiconductor body, wherein - at least two trenches laterally spaced from each other extend from the top side into the semiconductor body, wherein the trenches are filled with an electrically conductive material electrically isolated from the semiconductor body by an insulation layer applied on surfaces of the trenches and wherein the trenches are part of the insulated gate, - a functional portion of the semiconductor body is formed laterally adjacent to the two trenches and laterally between the two trenches, - in first sections overlapping with the trenches, the mask is thicker than in a second section overlapping with the functional portion; - at least two trenches laterally spaced from each other extend from the top side into the semiconductor body, wherein the trenches are filled with an electrically conductive material electrically isolated from the semiconductor body by an insulation layer applied on surfaces of the trenches and wherein the trenches are part of the insulated gate, - a functional portion of the semiconductor body is formed laterally adjacent to the two trenches and laterally between the two trenches, - in first sections overlapping with the trenches, the mask is thicker than in a second section overlapping with the functional portion; - forming a first region of a first conductivity type in the functional portion under the top side and adjacent to the trench, wherein forming the first region comprises implanting first-type dopants through the top side into the functional portion, wherein, for implanting the first-type dopants, - a directed implantation method is used in which, firstly, the implantation is done with a tilt angle α greater than 0° and then the implantation is done with a tilt angle α smaller than 0° so that the doping concentration of the first-type dopants in the functional portion is greater closer to the trenches than centrally between the trenches; characterized in that - a directed implantation method is used in which, firstly, the implantation is done with a tilt angle α greater than 0° and then the implantation is done with a tilt angle α smaller than 0° so that the doping concentration of the first-type dopants in the functional portion is greater closer to the trenches than centrally between the trenches; characterized in that - after forming the first region, depositing a protection layer onto the mask, wherein the protection layer laterally extends over the trench and the functional portion; - forming a second region of a second conductivity type in the functional portion under the top side, - forming the second region comprises implanting second-type dopants through the protection layer and through the top side into the functional portion, - at least a part of the first region adjacent to the trenches is preserved, - the protection layer is thinner in a section where the second region is to be formed than in a section where the first region is to be preserved, and - the deposition of the protection layer effectively forms a self-aligned mask, wherein the width of the preserved part of the first region is mainly controlled by the layer thickness of the protection layer.