How to change menu structure?

Customizing menu markup can only be accomplished by adding a WordPress filter and using your own, custom menu template.

Unfortunately, menus are not a part of the WordPress template hierarchy so you need to do something like this:

add_filter( 'wp_nav_menu', function( $nav_menu, $args ) {
  if( 'my_custom_menu' == $args->menu->slug ) {
    // include a template with your required markup
    // reference both the $nav_menu and $args params in the template
    return include('my-nav-template.php');
  } else {
    return $nav_menu;
  }
}, 10, 2);

This is a somewhat abbreviated answer. You’ll need to read the WordPress documentation on the nav_menu object / function in order to know exactly how to parse the object but it’s pretty straight forward.

Also, be sure that sidebar_menu is registered before calling wp_nav_menu() and that at least one menu has been assigned to the sidebar before trying this code.

Good luck!