Typically this should be a question for WordPress support team as the gallery block and the CSS is all handled by WP itself.
However, you can try something like this:
.blocks-gallery-grid .blocks-gallery-image figcaption, .blocks-gallery-grid .blocks-gallery-item figcaption, .wp-block-gallery .blocks-gallery-image figcaption, .wp-block-gallery .blocks-gallery-item figcaption {
position: unset;
}
.blocks-gallery-grid .blocks-gallery-image figure, .blocks-gallery-grid .blocks-gallery-item figure, .wp-block-gallery .blocks-gallery-image figure, .wp-block-gallery .blocks-gallery-item figure {
flex-direction: column;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/