Separate navigation stack for tabs - show back arrow & menu toggle depending on selected tab

In my Ionic app (current version) I have a tabs-structure looking similar to this:

In each tab I’m starting a new navigation stack. Meaning: Clicking ob the “push page” button for example pushes the new page to the first page’s navigation stack.

In the upper left corner I have the menu-symbol to open my side menu. Whenever I push a page to the root-navigation-stack, this symbol changes to become the “back-arrow”.

What I want is, that this symbol always represents the navigation stack of the selected tab. So when I push a page to the first page’s navigation stack I want to show the back-arrow. When I then change to the second page, I want the menu-symbol to be shown, until I push a page to the second page’s navigation stack. And so on…

Does anybody have an idea how to achieve this? Any help is appreciated. Thank you!