Fixed on desktop, relative to toolbar on mobile

I’ve got an element’s position which should be fixed on desktop but relative to the ion-footer > ion-toolbar on mobile

I tried to assign a fixed position to the element but it seems blocked by the toolbar (the element is then displayed outside the page)

Any idea how I could achieve that?