App navigation

Hi,

is it possible to control the device back button click from my ionic angular PWA app,
right now it behaves like a browser back click

for example, if my app includes 3 nested pages
home → categories list → category details

and the user makes navigation:
home → categories list → first category → category list → second category

when he uses the ionic navigation button and press back
he goes to category list and then to home

and if he uses the device back button he goes to
category list → first category → categories list → home

is it possible to make it behave the same as ionic back buttons?

thanks

More specifically: pwa support via capcitor?

I think it is possible
I will check it out

thanks for your help