If it lights consistently, but the flame just shuts off inappropriately, it's not the igniter. The most likely issue is the thermocouple which is a sensor with a prong that it's heated directly by the flame and sends voltage to the controller which lets it know that the ignition event was successful. Basically, the thermocouple translates heat into a small current. If it's going bad and takes too long to send the signal, the controller shuts off the gas, waits a short time and tried to light it again.
It sounds like the thermocouple is taking too long to send a strong enough signal. The one that I purchased in the past for a furnace was cheap and easy to replace. Just a couple of wires and a few screws.