Gallery is left out on purpose right now. TemplateRenderer.php has READING_MARGINS_EXCLUDED_PAGE_TEMPLATES = ['gallery.php', 'redirect.php'], and docs/plans/reading_margins.md says the justified rows were laid out for the normal width.
Reading site.css, that worry looks outdated. .gallery-grid is a wrapping flex row, and each tile's basis is its aspect ratio times the row height with min-width: 0, so rows refill whatever width the column has. The PR may be as small as dropping gallery.php from that list, then checking a narrow column, where a 2.2-ratio tile (26rem basis) has to squeeze into the 20rem minimum.