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 is His slave and Messenger.
If you are uncertain whether madhy (pre-seminal fluid) has been emitted during prayer, you are not required to take any action, and your prayer remains valid as the fundamental principle is that nothing has exited unless there is certainty to the contrary. This is supported by a narration in Sahih al-Bukhari and Muslim, where it is mentioned that a complaint was made to the Prophet about a man who imagines that he feels something during prayer. He
said: “He should not leave unless he hears a sound or detects an odor.”
This means that one should not break their prayer unless they are certain of an occurrence. Therefore, you should continue with your prayer and ignore any fleeting doubts.
However, if you are certain or strongly suspect that madhy has been discharged during prayer, then your prayer becomes invalid.
Allah knows best.