How to fix the «Return value of Magento\ConfigurableProduct\Model\Product\Configuration\Item\ItemProductResolver::getChildProduct() must be an instance of Magento\Catalog\Model\Product, null returned» bug in Magento 2.3.0?

To fix this bug, replace the vendor/magento/module-configurable-product/Model/Product/Configuration/Item/ItemProductResolver.php file with the following one:
github.com/magento/magento2/blob/3ef388525/app/code/Magento/ConfigurableProduct/Model/Product/Configuration/Item/ItemProductResolver.php

The bug is fixed by the following commit: