Hi there,
you can try using some CSS to force them to have a minimum height and center:
.attachment-woocommerce_thumbnail {
display: block;
min-height: 300px;
display: flex;
align-items: center;
}
But if you can, i would highly recommend that you edit and upload all images using the same size canvas.
This will save you a lot of headaches.
I personally create a Square template in Affinity Photo / Photoshop. And place my images inside that, some images may have extra whitespace but its really worth it.