Try to handle the state based on the last activity, so you can reopen the accordion.
Use the onOpen event to manage the activeIndexChange and handle the last active state.
onOpen
activeIndexChange