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.
The question is somewhat ambiguous and it involves asking so deep questions as well.
Hence, it will be answered according to our understanding of it.
If the impurity is thrown into running water, or that running water is poured onto the impurity, it is not possible that the water touches that impurity, unless the poured water or running water has reached that impurity, let alone changing its state. This is obvious because it cannot be imagined that the impurity reaches the running water or the water that is poured into it before this water reaches it.
Therefore, the water that is still in the bucket or the running water that has not yet reached the impurity is pure.
Majmoo’ Sharha al-Muhaththab, in the Shafi'i School of jurisprudence, reads:
“If the water is running and it has impurity, such as a dead body or running water that has been changed by impurity, then the water that is before it is pure because it did not yet reach the impurity; it is like water that is poured from a vessel into an impurity [i.e. the water that is still in the vessel remains pure]”
Allah knows best.