If we look carefully, both Statements do not really work out. U_U
White Zetsu Body : Having a White Zetsu body makes you immune to MT. This will not work simply because Orochimaru had a WZ body and still fell under MT.
Being Dead : Also does not work, cause as OP said, Edos are vulnerable to Genjutsu and MT is a Genjutsu. Edos have Life Force as they have souls and their chakra can be absorbed by God Tree.
So, how were they immune ? One possible explanation is this theory :
You must be registered for see links
Though, I the basis of the theory, RDS being Kaguya is outdated. It still works if the RDS is Hamura or any Ootstsuki (RDS has features of Ootstsuki) as all Ootstsuki could have been immune to MT simply because they helped Kaguya create MT (Sacrificing their bodies to become White Zetsu to first MT).
All random speculation though. Lol