You can add a button to the HamburgerSubMenu header. To do this, place a button or any other suitable item in the FlyoutHeaderTemplate and handle the click event. To close the flyout, you will need to create a descendant of the HamburgerSubMenu class to be able to access its non-public method. I am attaching an example of how this works.
In the meantime, a simple click on a sub item will work in the same way. I.e., it allows you to execute a command and closes the flyout. So, the purpose of an extra button in the header is not entirely clear. Would you please describe your final goal?