Mario Great Adventure 3 isn't just about clearing each level. You must be careful to collect all the coins and items as you go. If you miss any, you will not be able to leave when you reach the blue flag. The same goes for defeating all the enemies. You must defeat all of them. If you reach the blue flag and you do not exit the level, you missed something!