i agree with this guyIt was unexpected. Naruto went rushing in towards Sandaime Raikage with a Rasengan to match the Raikage who went at him with Hell Stab. Naruto was anticipating the strike and as soon as he felt the danger, he reacted to dodge and counterattack.
While for Madara, Naruto was standing still and not expecting a blitz like he was for Sandaime. Though Madara did form a hand sign before using shunshin on Sai and Naruto so we see that Naruto only had enough time to block but not react fast enough to get out of the way.