Multiple filter elements sharing the same URL parameter

I have radio filter element in sidebar. But on mobile I would like to have the same filter in toggleable offcanvas. Or as buttons row above archive.

But duplicating the element doesn’t work as even with the same URL parameter ie ‘category’ selecting one term from filter 1 then other from filter 2 (while the first one is still selected) results in both categories showing in URL like this:

shop/?category=cat1&category=cat2
or even shop/?category=cat1&category=cat1 (the same category twice)

It would be great if multiple filters could share the same URL parameter and essentially acting as one.

You can achieve this with CSS and some interactions without duplicating stuff. Mimic the offcanvas: on mobile breakpoint make block with filter fixed positioned and give it display none, then make interaction on some element (burger trigger for example): click → show element → CSS selector → your hidden block.