1. A method for producing a liquid ejection head that includes a member having an ejection port and a flow path communicating with the ejection port and a substrate having an energy generating element configured to eject a liquid supplied from the flow path through the ejection port, the method comprising:a step of providing a positive photosensitive resin layer on a substrate;
a step of heat-treating the positive photosensitive resin layer on the substrate;
a step of forming a mold material having a pattern of the flow path by subjecting the heat-treated positive photosensitive resin layer on the substrate to exposure and development;
a step of covering the mold material on the substrate with a negative photosensitive resin layer for forming the member;
a step of forming the ejection port communicating with the mold material by subjecting the negative photosensitive resin layer covering the mold material to i-line irradiation and development treatment; and
a step of forming the flow path communicating with the ejection port by removing the mold material from the substrate,
wherein the positive photosensitive resin layer includes a light absorbing agent that is nonvolatile at a temperature of the heat treatment of the positive photosensitive resin layer, and
the light absorbing agent has a light absorbance (a1) at a wavelength of 365 nm and an average light absorbance (a2) in a wavelength range of 280 nm or more to 330 nm or less, and an absorbance ratio A is 1.0 or less where the absorbance ratio A is a ratio a2/a1.