Hello,
It is due to different heights of images. In order to have the same size image, I kindly recommend you prepare images you want before uploading them to your media library using the graphic editor (Photoshop or any other) to have a nice-looking grid or You need to find a third party plugin to achieve more functionality that best suits you.
For the Product Archive page, please navigate to Theme Settings > Product archives -> Products styles, here you can enable the Even product grid for desktop option to align products if they have different height components.
https://prnt.sc/ASt5z0mmasuz
Please note that this option helps product items to be even, not resizing images.
Best Regards