In module.xml add this :-
<sequence>
<module name="Magento_Catalog"/>
<module name="Magento_CatalogSearch"/>
<module name="Magento_Checkout"/>
<module name="Magento_Sales"/>
<module name="Magento_Quote"/>
<module name="Magento_Vault"/>
<module name="Magento_OfflineShipping"/>
</sequence>
Or you Can Use Plugin For Override
addUrlRewrite
function
put below code in Namespace/Module/etc/di.xml
<type name="Magento\Catalog\Model\ResourceModel\Product\Collection">
<plugin name="product-collection-addurlrewrite" type="Namespace\Module\Plugin\Product\Collection" sortOrder="1"/>
</type>
Create Namespace\Module\Plugin\Product\Collection.php
and pasted below code in your file:
<?php
namespace Namespace\Module\Plugin\Product;
class Collection
{
public function addUrlRewrite()
{
// do your stuff here
return $result;
}
}