Exporting menu along with code
As far as I know, the menu itself is exportable by the built-in config management but the links are not (because the menu is config, the links are content). So when you export the configs and import it on the target environment, you get an empty menu.

What you could do is manually create the menu links programmatically during deployment. One technique is to use a "deployment module", where you use a dummy module and take advantage of hook_update_N. As for creating the menu items in Drupal 8, this answer can probably help you.