Finally, I waited for a response from Yandex.Direct support.
If ads are created within different groups, the ads will be selected according to the auction principle.
If one ad contains the same query with and without quotes ("buy an elephant" and buy an elephant), then the exact match (for the user's request to buy an elephant) will always show up for the keyword in quotes. Even if the CTR of the phrase in quotes is lower, and the price to reach the position is higher. This only works within the ad group.