Tab-bar, IonButtonBack navigation help

Hello, as training purpose i have a simple test project

  • skills page
  • skills detail page
  • profil page
  • profil detail page

Routing :

          <IonRouterOutlet animated={true}>
            <Redirect
              exact
              from="/"
              to="/skills" />
            <Route
              exact
              path="/skills"
              component={Skills}></Route>
            <Route
              path="/skills/:id"
              component={SkillDetail}></Route>
            <Route
              exact
              path="/profils"
              component={Profils}></Route>
            <Route
              path="/profils/:id"
              component={ProfilDetail}></Route>
          </IonRouterOutlet>

Tab-bar

          <IonTabBar slot="bottom">
            <IonTabButton
              tab="skills"
              href="/skills">
              <IonIcon icon={book} />
              <IonLabel>Skills</IonLabel>
            </IonTabButton>
            <IonTabButton
              tab="Profils"
              href="/profils">
              <IonIcon icon={body} />
              <IonLabel>Profils</IonLabel>
            </IonTabButton>
          </IonTabBar>

I navigate betweens pages with history ( react router history ) i.e :

  const history = useHistory();

and :

 onClick={() => history.push(`/skills/${skill.id}`)}>

Each *Detail page has a “IonButtonBack”

       <IonButtons slot="start">
            <IonBackButton />
        </IonButtons>

Starting from Skills i can go
to
SkillDetail ( which also display profils with the said skill ) then
to
ProfilDetail

And that’s where lies the problems
If from ProfilDetail i click on the “skills” tab-bar button
i go back to SkillDetail, but when i click on the “backbutton” from SkillDetail,
it only “pop” the ProfilDetail,
and then i have to click again on “backbutton” to go back to the Skills page

Is there a way to prevent this behavior so “directly” remove from history all have after "skills/… ?
And a way to configure the “backbutton” target ?
Like, can i decide to force the ProfilDetail “backbutton” to always go back to the Profils page ?

The Ionic navigation is a bit confusing for now and i dont seem to get how to configure that properly,
some help would be very appreciated !

thanks