As we know Obito got the Juubi extracted from his body but the Gedo Statue remained. So since the Gedo Statue was still in him, he didn't die so he was just unable to move for awhile.
Then, Obito used Rinne Tensei to bring back Madara. You can argue he didn't die because he only revived one...