"Cannot Change Dependencies of Dependency Configuration" gradle error in Unity IAP 4.12.0

That worked for me, thanks
Full UnityIAPDependencies.xml file:

<dependencies>
    <androidPackages>
        <androidPackage spec="androidx.activity:activity-compose:1.3.1">
            <repositories>
                <repository>https://maven.google.com/</repository>
            </repositories>
        </androidPackage>
        <androidPackage spec="com.android.billingclient:billing:6.2.1">
            <repositories>
                <repository>https://maven.google.com/</repository>
            </repositories>
        </androidPackage>
    </androidPackages>
</dependencies>