We have seen that Obito and Nagato were pierced by black rodes and filled with Madara's will/hatred.But when Naruto
had a talk with Nagato he changed his mind.This talk with Naruto made Nagato to use rinnetensei no jutsu.
You must be registered for see links
But one thing intresting is that both Nagato and Naruto is from uzumaki clan. Uzumaki clan have strong life force.
You must be registered for see links
So I think that people born from uzumaki clan have strong life force.They with their life froce can withstand against Madara's will and take a better decision.
The people from uchiha clan can't win against Madara's will. According to Tobirama-
You must be registered for see links
Thats the reason why I think Obito can't win against Madara's will.
Uzumaki do have strong forces of life but,just because he is an uchiha doesn't mean he automatically can't break free.
There is a more simple reason he does not inherently have a strong force of life because he is not an uzumaki.doesn't have the amoutn of chakra nagato had,has the same ideal as madara (not that not having his ideal is key to breaking his will)
Obito is not stronger then madara and that is why he is not breaking out of it.
Lol it's not like narutois immune to madara's will. Anyway, I don't think what you said about nagato is the case because in contrast to Obito's case, when Nagato was pierced, madara wasn't around to channel his chakra and therefore his will.