This is a childishly simple question to answer. The answer is yes. For exactly the same reason that someone with perfect contrition must still go to confession ASAP if they were in a state of mortal sin.
So, it's already been splained to you, the Sacrament of Baptism is absolutely necessary by necessity of means for salvation, and even the Council of Trent explicitly teaches that Baptism and Confession are very different. Baptism is the gateway to the other Sacraments, and, is a "character" Sacrament, and just like no one can have "Holy Orders of Desire", similarly, no one can have Baptism of Desire.
Now, someone in mortal sin can be restored to a state of justification by perfect contrition COMBINED WITH the intention to go to Confession. Almost everyone forgets that second part. But, the Sacraments cannot justify anyone who's not already part of the Church's Sacramental life, and so Confession cannot profit unto salvation for those who are not already baptized.
Baptism: Sacramental Character + Justification, and Initial Justification is Rebirth, and remits Original Sin, guilt of actual sin, and all temporal punishment due to sin.
Confession: restores to justification to the baptized who had lost their state of Justification after Baptism (a re-Justification, as it were)
Completely different animals, where Confession is not a complete rebirth as is the Initial Justification of Baptism, and does not bring with it the Sacramental Character that makes people members of the Church, giving them the "DNA" of Christ, as it were/
Baptism makes non-members of the Church into members of the Church.
Confession restores dead members of the Church to life.
First is a new birth into a new creation, the second a revivification of that new creation.
You're comparing apples to oranges ... so, despite delcaring it "childishly simple", your merely show yourself idiot.