The cessation of menstrual bleeding and the renewed obligation of prayer are related but distinct legal questions. Hanafi jurisprudence differentiates cessation at the maximum period from earlier cessation.
The basic rule here is that ghusl follows the ending of menstruation; detailed timing rules belong to the dedicated chapter.