MPLS L3 VPNs - AD of the protocol versus BGP Path Selection

Hello, everyone.

I have a fairly complicated question that I haven’t found an answer to.

I have this topology here. The configuration part doesn’t matter, the customers are running EIGRP everywhere (even over the backdoor link). The PE routers perform redistribution into MP-BGP and carry those routes as VPNv4.

My question here is, I understand that EIGRP routes, for example, carry the extended cost community with a POI of 128. This makes the PE routers evaluate the EIGRP cost in the community before the whole BGP path selection process.

Thanks to that, it prevents a scenario like this from happening where P3-XR (or P4) would prefer the backdoor path instead to reach the remote prefix.

My question is, though, how does this provide loop prevention? Wouldn’t P3-XR (or P4) still accept the route just because EIGRP’s AD is much less than iBGP’s AD? A course I was following said that P3-XR would only prefer the route because it would redistribute it into BGP with a weight of 32768 which would make that route preferrable over the route sent by P4. Weight would simply always win, that’s why we use the extended cost community.

My question is, why isn’t the AD being compared here? Why doesn’t P3-XR still install the EIGRP route for 20.20.20.20/32? The AD is 90 < 200.

Why is the route from P4 (AD 200) being preferred over the route from P1 (AD 90)?

A blogpost from INE states

BGP updates that contain the cost community attribute will use the EIGRP AD instead of the iBGP AD of 200 to compare routes on metric alone.

So does the extended cost community make the PE routers consider the EIGRP AD for both routes instead?

Thank you
David