Place image dimension as shown in the picture:

Then apply this CSS code:

img.attachment-woocommerce_thumbnail{
	height: 400px;
	object-fit: cover;
	width: 100% !important;
}
.products .product .product_thumbnail img{
	width: 100% !important;
}