Bug: side-menu with expose-aside-when will close by itself when a modal or popover comes up

In a side-menu with expose-aside-when=large, I have a button to show a modal and a popover.
After I click it, the side-menu would close by itslef, which is not expected.

Same bug here, how can i solve it?

checkout Popover in side menu - how to stop side menu close