I am having a problem with the product list when adding new products. It was working properly until I added a new product. Then, the product list stopped being visible in the catalog pages and search results. I'm not able to replicate this in my local environment, and upon further investigation, I found out that this line of code doesn't work in a catalog page if there are products in that particular catalog:
<?= $block->getProductListHtml() ?>
Note: I changed the theme back to luma, and the issue still exists.
Update: I found out that these lines of code in vendor/magento/module-catalog/view/frontend/templates/product/list.phtml are causing the issue:
$productImage = $block->getImage($_product, $imageDisplayArea);
if ($pos != null) {
$position = ' style="left:' . $productImage->getWidth() . 'px;'
. 'top:' . $productImage->getHeight() . 'px;"';
}