Hello Alexandr,
Inside the BGP onfederation, the best path selection cannot be calculated with AS PATH length attribute. This can be taken care only by adding addition configuration like Local preference or Weight.
In your output shortest patch is selected based on Lowest Next hop IP address.
Best Regards,
Nikolay