That is Allah Must assign someone similar to prophet in his attributes and Ismah as his successor to guide the people without any deviation in religion.
Who must assign a successor after the demise of a prophet?
Allah