In short, this verse does not say all of the Muhajirs and Ansars. It says “from” which means some of them. Hence, we say it does not include the hypocrites.
One of the very early Muhajirs was the husband of Umm Habeeba. His name was Ubaydullah ibn Jahsh. Many historical reports indicate he left Islam and became Christian. Would the verse still include him? Of course not. So the verse does not say all of them. That’s the point.