The man you are talking about was Muselma Kazzab , as we know with every prophet comes itmam e hujjat the punishment for the disbelievers who disbelieve knowingly which was established thru prophet SAW and his companions , muselma kazzab and there were more at that time who claimed to be prophet , soon as prophet SAW passed away they started revolting against muslims and even refused to pay zakah , as prophet SAW predicted before his passing that muslims will conquer persian n roman empire so this was also part of Allah’s decreed itmam e hujjat THE DIVINE PUNISHMENT TO WHOM TRUTH HAS BEEN SHOWN jinpe ye haqq waaze hogya tha ke muhammad saw Allah ke nabi hai ,
So when after muhammad saw passed away , Abu bakr RA became khalifa and divine punishment again occurred on the evil ones so battles took place muslims successfully reign medina again with the help of Khalid bin walid RA n many great sahabas at the time,
So killing anyone now is not the same matter , we don’t have due rights to kill any innocent until they commit some serious crime.
Hence we cannot kill a man claiming to be prophet, unless he kills an innocent.