I have override vendor/magento/module-catalog/Model/Layer.php for custom product collection but now the layer navigation and product count is working wrong, I checked for Magento\CatalogSearch\Model\Search\IndexBuilder.php file but this is not exist in M 2.4.1 + elastic search.
I am following this link https://www.rakeshjesadiya.com/apply-custom-conditions-for-product-collection-in-magento-2/
and https://community.magento.com/t5/Magento-2-x-Programming/Incorrect-product-count-in-layered-navigation-after-overriding/m-p/104534#M5628
But not working for me.