The Roman catechism is certainly in agreement with the council of Trent, I do not think anyone disputes this.
I am not sure what there is to explain since like Trent, this catechism does not teach anything about a BOD. For that matter, neither the idea nor the term, "baptism of desire" has ever been used in any encyclical or official Church docuмent - because although it appears in some later catechisms, the Church does not teach a BOD.