This is a very popular urban legend about Pope Leo XIII.
The Leonine Prayers (including the prayer to the Archangel Michael) were appointed to be said AFTER Low Masses (and not even all of them). They had nothing whatever to do with this vision that didn’t take place, but were originally composed with the intention of protecting the temporal sovereignty of the Papal States and Holy See from their being taken by the Italian government.
After the settling of the Roman Question (as it was called) by the Lateran Treaty of 1929, Pius XI changed the intention of these prayers to “the conversion of Russia.”