What is the basis of St. Pius X in 1906 that led to the approval of the prayer devotion: "Mary Virgin Priest, pray for us"? In 1906, Pope Pius X approved a prayer which says “Mary, Virgin Priest, pray for us.” However, a Holy Office decree of 1916 forbade the use of any image that had Mary wearing vestments – some say for fear of the possibilty of an argument for women’s ordination, others that Mary as a priest was a metaphorical image taken too far. -The Priesthood of Mary

NOTE: There is a related thread on this question but the accepted answer is Mary Virgin Priest is not a ministerial priesthood.
Are Catholics permitted to honour Mary as a priest?.
QUALIFIER
For those who believe that Mary Virgin Priest is a valid expression , what kind of priesthood does Mary possessed? Is it similar to the Sacramental Order of the ministerial priesthood instituted by Christ or is it a unique concept associated with Mary at the foot of the Cross.
SPECIFIC QUESTION
What is the basis of St. Pius X in 1906 that led to the approval of the prayer devotion;
Mary Virgin Priest, pray for us?
What are the origins that lead Pope St. Pius X in 1906 to approve the prayer invocation: “Mary Virgin Priest, pray for us”?
Prior to Pope Pius X’s approval to this invocation, Blessed Pope Pius IX had manifested his approval of the same title in a letter addressed to Msgr Oswald Van den Berghe, author of Marie et le Sacerdoce.

Marked by the priestly piety of the school of Bérulle, Pope Saint Pius X was singularly favourable to the invocation of Our Blessed Lady under the title of Virgo Sacerdos. Already in 1875, Blessed Pius IX had manifested his approval of the same title in a letter addressed to Msgr Oswald Van den Berghe, author of Marie et le Sacerdoce. Saint Pius X was pleased when an Italian translation of this work appeared.
When the Daughters of the Heart of Jesus, founded by Blessed Marie de Jésus Deluil-Martiny, asked for permission to invoke the Mother of God, in their chapels, as Maria Virgo Sacerdos, Saint Pius X wishing to extend the devotion to all the faithful, charged Cardinals Vanutelli and Vivès with composing a prayer that would make this Marian title better known. The prayer appeared, indulgenced by Pope Saint Pius X, on 9 May 1906. - Prayer to Mary, the Sacerdotal Virgin

The Postulator of her Cause of Canonization is a priest from my home archdiocese.

The Daughters of the Heart of Jesus
The second phase of Marie Deluil Martiny’s life was a flowering of the first. After a long preparation in prayer, she opened the first house of the Society of the Daughters of the Heart of Jesus at Berchem near Anvers in Belgium on June 20, 1873. The new foundation was characterized by a burning desire to console the Heart of Jesus, and by a mystical participation in His victimal priesthood, patterned after that of His Holy Mother at the foot of the Cross.
Divine Jealousy for Sacerdotal and Consecrated Souls
Mother Marie de Jésus wrote: “They will live from that life of suffering love that was the intimate life of the Heart of Jesus; they will penetrate the most tender secrets of His love: the Eucharist, the Church, His divine jealousy for sacerdotal and consecrated souls.”
Priests: Sacrificers and Victims
“What a calling! The Work must give to Christ souls who offer themselves as a sacrifice of Love, these will be “the victims of Love that Jesus asks for,” by the Holy Eucharist. The Host has become indispensable to my life; I should wish never to leave it for the sake of sacerdotal souls [priests]. Too many of them are satisfied with being Sacrificers and exercise their sacred functions without steeping them enough in the Priestly Spirit, that is, without themselves becoming truly Victims at the same times as Sacrificers, and so God wills that legions of souls who are truly Victims offer themselves as humble supplements for what certain priests are lacking in the Priestly Spirit. Their example is Mary, the Mother of Jesus.”
Offering for Priests
“To offer yourself for souls is beautiful and great,” wrote Mother Deluil Martiny, “but to offer yourself for the souls of priests is so beautiful, so great, that you would have to have a thousand lives and offer your heart a thousand times. . . . I would gladly give my life if only Christ could find in priests what he is expecting from them. I would gladly give it even if just one of them could perfectly realize God’s divine plan for him.”
The Blessed Virgin Mary United to the Victimal Priesthood of Her Son
Marie Deluil Martiny presents the Blessed Virgin Mary as the Mother of Christ the Victim Priest and of all who are called to follow Him in the way of His Victimal Priesthood. By her most intimate and perfect participation in the Victimal Priesthood of her Son, the Blessed Virgin Mary is both Coredemptrix and Mediatrix. She is the Virgo sacerdotalis, sacerdotal, not by virtue of sacramental ordination, but by virtue of her unique and entire adhesion to the Sacrifice of Christ. - A Life Offered for Priests

The above information provides the basis that led to the approval of the prayer devotion: “Mary Virgin Priest, pray for us” by Pope St. Pius X in 1906?
Fr. Francis Marsden, 36 yrs a priest of 36 years with a Cambridge chemistry doctorate puts it this way:

As a Catholic priest, when I saw this question, I thought it was untrue. It’s forty years since I started theological studies, and I don’t remember ever seeing a prayer which addressed Mary as Virgin Priest.
The expression made me rather uncomfortable, especially in the modern context of agitation for the ordination of women.
However, the questioner turns out to be correct. There was a prayer for priests issued in 1906 which uses the expression “Maria, Virgo Sacerdos, ora pro nobis.”
The rationale quotes St Antoninus: “although you (Mary) did not receive the Sacrament of Order, you were full in dignity and grace of whatever is given by it.” You are therefore rightly hailed as Virgin Priest.
It was a prayer which the Daughters of the Heart of Jesus were accustomed to recite in their churches. That’s a religious order I’ve not heard of.
Back in 1906 nobody would have thought of women becoming priests, whereas now it’s all the rage to campaign for it. So I doubt that such a prayer would today obtain official approval.
Just to make sure, in 1916 the Holy Office prohibited pictures of Mary shown in Mass vestments.
Denominations which have ordained women to their priesthood might have less qualms about this expression Virgo Sacerdos. - What is the basis of St. Pius X in 1906 that led to the approval of the prayer devotion; “Mary Virgin Priest, pray for us”?

Fr. Raniero Cantalamessa, OFMCap, Pontifical Household Preacher states that the invocation is officially not permitted publicly!
Cardinal Raniero Cantalamessa O.F.M. Cap. (born July 22, 1934) is an Italian Catholic cardinal and priest in the Order of Friars Minor Capuchin and a theologian. He has served as the Preacher to the Papal Household since 1980, under Pope John Paul II, Pope Benedict XVI and Pope Francis. Pope Francis raised him to the rank of cardinal on 28 November 2020.

&quot;First of all I would like to refer to the question of the title of priest attributed to the Virgin in tradition. A writer of the end of the fifth century calls Mary &quot;Virgin, and at the same time priest, and altar who has given us Christ -- bread of Heaven for the remission of sins.&quot; After this, there were frequent references to the topic of Mary as priest, which subsequently became the object of theological developments in the 17th century, in the French school of St. Sulpice. In it, Mary's priesthood is not placed so much in the context of a relationship with the ministerial priesthood, but rather with that of Christ.&quot;
At the end of the 19th century a true and proper devotion to the Virgin-priest spread, and St. Pius X even accorded an indulgence to its relative practice. However, when the danger was perceived of confusing the priesthood of Mary with the ministerial priesthood, the magisterium of the Church became reticent and two interventions of the Holy Office practically put an end to such devotion.
After the council, the priesthood of Mary is still spoken of, but it is no longer linked to the ministerial priesthood nor to the supreme priesthood of Christ, but rather to the universal priesthood of the faithful. As figure and first fruits of the Church, she possessed in a personal way that &quot;royal priesthood&quot; (1 Peter 2:9), that all the baptized possess in a collective way. - Fr. Raniero Cantalamessa, OFM Cap, Pontifical Household Preacher.

Decree of April 8,1916:

Decretum
Circa  Imagines Exhibentes BeatIssimam Virginem Mariam Indutan Sacerdotalibus.
Cum recentioribus praesertim temporibus pingi atque diffundi coepissent imagines exhibentes Beatissimam Virginem Mariam indutam vestibus sacerdotalibus, Emi ac Rmi DD. Cardinales Inquisitores Generales, re diligenter perpensa, fer. iv, die 15 ianuarii 1913, decreverunt: « imaginem B. M. Virginis vestibus sacerdotalibus indutae esse reprobandam ».
Feria vero iv, die 29 martii 1916, huiusmodi Decretum publicandum mandarunt.
Datum Romae, ex aedibus S. Officii, die 8 aprilis 1916.
Aloisius Castellano, &amp; R. et U. I. Notarius.