All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
If you attain ritual purity after the end of your menstruation by seeing one of the two signs, namely the dryness of the vagina or the emission of the white discharge marking the end of menstruation, and you then experienced the mentioned discharge, then do not consider it as menstruation. Rather, it is enough that you perform Istinjaa' (cleaning oneself with water after answering the call of nature) and ablution before prayer. You are not obliged to perform Ghusl after this discharge stops. The yellowish and brownish discharge emitted after purification are not considered menstruation according to the preponderant view unless they are emitted directly after the menstrual bleeding with no interval of purity in between. Umm ʻAtiyyah, may Allah be pleased with her, said, "We never gave any consideration to yellowish and brownish discharge after purification." [Abu Daawood]
Hence, you come to realize that you did not have to repeat the Ghusl in this situation and that your Ghusl after the menstrual bleeding stopped was enough.
Allah knows best.