Prevent button in accordion header from toggling accordion

Helllo, as in the topic.
I have IonAccordionGroup with coupe of IonAccordions inside and I want to have in each IonAccordion header one additional button that is opening a modal.

Everything works as expected besides the fact that clicking on the button not only opens my modal but closes accordion as well.

Is there any recommended way of making this work as expected?

You can apply the stopPropagation method provided by javascript to the button method: Event.stopPropagation() - Web APIs | MDN