Keep element in scroll view while animating open

I have an accordion-type component at the bottom of a scrollable container. When the accordion opens, it ends up just overflowing behind the scroll region. I’m trying to get the expanded contents to remain within view while opening. Because it animates open over time, simply setting the scroll position on-trigger doesn’t work. Another option is delaying the scroll until it’s fully open but this is a clunky experience. What are the solutions to this problem?