Router back not working properly on coming back from some routes

In our application, while navigating back to a previous route again the closed page opens back in case of some routes. The framework7 router history is showing different history length and window.history is showing different history length.