Canonization only means the Church is able to declare that a person definitely made it to heaven. It doesn’t mean the Church claims the person never held a mistaken belief.
I would point out that for modern canonizations, such as St. Alphonsus and St. Maximilian here, the Church does a thorough and complete review of the person’s written works as part of the canonization process, to make sure that the person was not writing or advocating anything contrary to faith or morals. This is typically done prior to declaring them “venerable”.
A person who was writing and teaching actual “heresy” would be highly unlikely to make it to canonization. The only way that could happen would be if the saint had been going around teaching heresy, then all of a sudden had some big conversion experience, reformed and rejected all their past heresy and repented and became a staunch Catholic, etc. For example, St. John Henry Newman converting to Catholicism.
Neither St. Alphonsus Liguori nor St. Maximilian Kolbe had any such conversion experience. They didn’t need to, because they weren’t speaking, writing, or teaching any heresies.
It appears that the OP’s friend has somehow fallen into the trap of sola scriptura, probably having been influenced by some misguided Protestant he talked to or read a book/ watched a video by. Furthermore, OP’s friend probably has one of those “Mary problems” we often see cropping up on this forum, where somebody decides that some work of Marian devotion/ theology is “not Biblical” or otherwise makes them uncomfortable because they see it as “too much Mary” or “putting Mary above God” or some other weird thing that it isn’t.
I will say that some of the writings of St. Maximilian Kolbe are pretty advanced views of Marian theology and are not for beginners or the faint of heart. Nevertheless, the man is a saint and Catholics are using his works to consecrate themselves to Mary daily. There’s nothing wrong or heretical about them in the eyes of the Church.