Somehow, WP does not properly update a category’s hierarchy level (whether it’s a parent or a regular category). This means that when creating a new category, you must first create and assign its subcategories before adding it to the menu.
If you don’t, the menu will not reflect the hierarchy afterwards. The only workaround is to remove the parent category from the menu and add it again so that WordPress recognises its structure correctly.