I have successfully overwrite core file: Magento\Sitemap\Model\ResourceModel\Catalog\Product
but getting error in public function getCollection($storeId) for this: $this->scopeConfig->isSetFlag and $this->getConnection() method not found.
When try to overwrite whole file getting this error: Incompatible argument type: Required type: \Magento\Sitemap\Helper\Data. Actual type: string;
Ref: I have overwrite core file as this: magento 2.3 how to override protected function in custom module
Any help will be appreciated. Thanks.