\Magento\Catalog\Block\Product\AbstractProduct is deprecated since 101.1.0.
Could anyone tell what is the good/substitute solution?
Which API functions within it are you looking to use. https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Catalog/Block/Product/View.php might be useful if you need getAddToCartURL
Yeah the view.php class seems like a good workaround until AbstractProduct gets a replacement. View.php extends AbstractProduct so it has everything you need, and ideally when abstract product gets replaced the view class will get updated to extend that and your underlying class will just continue to happily keep working without realizing what happened.