I am facing an issue with the navigation controller where I have a ViewPager2 inside one of the fragments of the navigation controller, and when I navigation to the page the first time, it's working perfectly, but whenever I try to navigate to the other pages and navigate back to this page it's messing up the tab layout background and also the state.
I have tried removing this fragment and navigating to this fragment as a new fragment, but the tab layout is still messed up.