so i'm a guy addicted to masturbation (extremely regretting it though). i do it once in two weeks. i know it's consequences and am ashamed of it. Anyways, after doing it, i immediately perform Ghusl, but fluids keep exiting. i cannot identify by the look of them on clothes if it is Sperm (Mani) or not so i'm not sure if my ghusl is invalidated and the salah which i performed is nullified or not? as a result, i keep doing ghusl again and again, performing the same salah again and again until the fluids stop exiting. whenever i go into sajdah, it comes out. The cause is obviously my sinful habit.
The answer to your question is that, sperm is only that which emerges from your penis during the orgasm. And it is caused by ejaculation. And the fluid/liquid which comes after sometime is not considered as sperm, rather it is called as Mazi(مذي). And after coming out of Mazi, you should only do Wuzu(وضو).
If you can understand Urdu, then check the URL below, this is the Fatwa about your problem.