product.hasReceipt returning False value even after purchase has been done successfully

I am making a game with a non consumable purchase which helps double the score of the player every time they finish a level without watching ads.

The problem that I am facing is that the code works fine as long as i don’t change the scene where the button for the purchase is present. Once I change the scene and get back, product.hasReceipt returns False value. This leads to the player not being able to receive the perks even if they have paid for the item(I tried this by downloading my game from Play Store as well). Is there any way to get around this issue?

Unity Version: 2022.2.1f1
IAP version: 4.9.3
Platform: Windows 10
Targeted Store: Google Play Store

Below is the complete IAP code that I am using:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEngine.Purchasing;

[Serializable]
public class NonConsumable
{
    public string name, Id, description;
    public float price;
}

public class IAP : MonoBehaviour, IStoreListener
{
    public NonConsumable nc;
    IStoreController storeController;
    public GameObject getProButton;
    public static readonly string getPro ="Get Pro";
    void Start()
    {
        SetupBuilder();
    }

    public void SetupBuilder()
    {
        var builder=ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
        builder.AddProduct(nc.Id, ProductType.NonConsumable);
        UnityPurchasing.Initialize(this, builder);
    }

    public void OnInitialized(IStoreController controller, IExtensionProvider extensions)
    {
        Debug.Log("Initialized");
        storeController=controller;
        CheckNonConsumable(nc.Id);
    }

    public void NonConsumable_Btn_Pressed()
    {
        storeController.InitiatePurchase(nc.Id);
    }

    public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs purchaseEvent)
    {
        var product=purchaseEvent.purchasedProduct;
        Debug.Log("Purchase Complete "+product.definition.id);

        if(product.definition.id==nc.Id)
        {
            Debug.Log("Purchase Successful");
            DoubleScore.GetPro();
            getProButton.SetActive(false);
            //PlayerPrefs.SetInt(getPro,1);
        }
        return PurchaseProcessingResult.Complete;
    }

    public void CheckNonConsumable(string id)
    {
        if(storeController!=null)
        {
            var product = storeController.products.WithID(id);
            if(product!=null&&product.hasReceipt)
            {
                Debug.Log(product.hasReceipt);
                DoubleScore.GetPro();
                getProButton.SetActive(false);
                //PlayerPrefs.SetInt(getPro,1);
            }
            else
            {     
                Debug.Log(product.hasReceipt);
                DoubleScore.FailedGetPro();
                getProButton.SetActive(true);
                //PlayerPrefs.SetInt(getPro,0);
            }
        }
    }

    public void OnInitializeFailed(InitializationFailureReason error)
    {
        Debug.Log("initialisation failed"+error);
    }

    public void OnInitializeFailed(InitializationFailureReason error, string message)
    {
        Debug.Log("initialisation failed"+error+message);  
    }

    public void OnPurchaseFailed(Product product, PurchaseFailureReason failureReason)
    {
        Debug.Log("Purchase failed"+failureReason);
    }
}

So I figured out the problem just now. For anyone having the same issue of product.hasReceipt giving false value even after a successful purchase, follow the given steps:

Go to Play Console > Pre-Launch Report > Settings > Scroll down and Uncheck “Turn on pre-launch report” option.

Give it some time to get into effect.

thank u so much