How Izanami works
To begin the technique, after selecting any arbitrary moment, the caster uses their Sharingan to remember the physical sensations both of their body and that of their opponent's during that instant like a photograph (represented as: A).
The user must then intentionally replicate the same sensation and in the same way, memorise that instant with their Sharingan (represented as: A'). Izanami overlaps and connects these two identical bodily sensations (A and A'), as well as the flow of time between them, creating an infinite loop of events that entraps the opponent's consciousness.
Depending on the Izanami user, he may not even be capable to activate it to begin with. Izanami needing the bolded and underlined part to be activated, a Madara behind his Susanoo, it would never happen
Now if i were to suppose Madara weren't to protect himself for some reason and allowing himself to be caught by the technique, Madara knowing who he is, knowing all Uchiha forbidden techniques(not a stranger knowing nothing like Kabuto), it would be useless as well