I would contend virginity is not associated with the physical properties, but more a spiritual state. A woman who is raped is not morally robbed of her virginity. Even a woman who has physically lost virginity by way of sin, in a sense, has that virginity restored when she receives the healing sacrament of confession.
Anyway, the Catechism says the following about Christ’s birth:
CCC#499 The deepening of faith in the virginal motherhood led the Church to confess Mary’s real and perpetual virginity even in the act of giving birth to the Son of God made man. In fact, Christ’s birth “did not diminish his mother’s virginal integrity but sanctified it.” And so the liturgy of the Church celebrates Mary as Aeiparthenos, the “Ever-virgin”.There is discussion on whether or not Mary’s physical virginity “during” the Virgin Birth is an infallible teaching.
Fr. Most at EWTN article says yes.
Fr. Saunders at EWTN says the Church has not infallibly declared it. The evidence, at a minimum is very strong in favor of it, if not infallible.