Thanks for the question.
does it heat only the first few minutes and only when the dryer is cold.
The problem is the gas valve , most dryers have separate coils on the valve that one is built in, thats the part you need to replace.
Try this one for that valve.
Well I tried to get it cheaper, glad you did good luck with the replacement.
Thanks and God Bless.
If you need more assistance let me know.