Material heresy is forgiven with all of your other sins upon justification. During your sanctification as you mature you will repent from any material heresies you believed and conform to orthodoxy. I didn’t understand the Trinity at all as a young Christian and when I came to understand that partialism was a heresy I repented. I was a regenerated justified believer, but was wrong about the Trinity, until someone explained it in a way I could understand. A formal heretic would reject orthodoxy even after correction and discipline, proving they were false converts to begin with. (this is a general answer for all incorrect understandings that new believers might have, given they are true converts.)