I figured out why it was happening —
If some products in the shop have a discount applied and show the original price struck out next to the sale price, it messes with the formatting for some reason. This problem does not happen, however, when all the products have a discount applied.
Is there some way to fix this so that having select items on sale won’t mess with the flow of all the products?