the reason for this is because Firefox doesn't animate display: none as a discrete property, because it would cancel out the animation. that behavior may change with transition-behavior: allow-discrete, which will be included in Firefox 129 next week. the solution is to animate the content in the sidebar to position: absolute, which has issues but works across Firefox and Chromium browsers