The Midrashim [Bamidbar] Rabbah and Tanchumah, and the Targum Yonasan Ben Uziel write that When Pinchas killed zimri and Kozbi many miracles took place.
Two of the miracles are listed as follows:
Bamidbar Rabbah
הַתְּשִׁיעִי, לֹא הִטִּיפוּ דָם, שֶׁלֹא יִטַּמָּא פִּינְחָס. הָעֲשִׂירִי, שֶׁשָּׁמַר הַקָּדוֹשׁ בָּרוּךְ הוּא רוּחוֹתֵיהֶן שֶׁלֹא יָמוּתוּ וְיִטַּמָּא
Medrash Tanchumah
הַתְּשִׁיעִי, לֹא הִטִּיפוּ דָּם, כְּדֵי שֶׁלֹּא יִטָּמֵא פִּנְחָס. הָעֲשִׂירִי, שָׁמַר הַקָּדוֹשׁ בָּרוּךְ הוּא רוּחָם שֶׁלֹּא יָמוּתוּ.
Targum Yonasan Ben Uziel
נֵס חַדְסְרָאֵי דְאִתְנַטְרוּ כַּד חַיָין עַד זְמַן דַהֲלִיךְ יַתְהוֹן בְּכָל מַשִׁרְיָיתָא מִן בִּגְלַל דְלָא יִסְתָּאָב כַּהֲנָא בְּאָהֳלֵי דְמִיתָא. נֵס תְּרֵיסְרָאֵי דְאִתְקַרִישׁ אַדְמֵיהוֹן וְלָא נָפִיל עִילַוֵיהּ
Translation: 1) Their blood did not drip on Pinchas as not to make him Tamei.
2) Their life was kept in them (as long as Pinchas was carrying them) so as to avoid Tumah.
Question: If they did not die until later, why would their blood make Pinchas Tamei, if it was blood that dripped while they were still alive?
Note: The Sifrei only brings the miracle of the blood not dripping out, but not the one of them not dying.