There's not been a consensus either way.
There was a lack of consensus during the Patristic period, but after St. Bede there was a consensus that lasted over a thousand years.
It's a debated topic.
After that long period of consensus, there has only been debate about globe earth among Catholics since Vatican II. The 19th century belief in flat earth promoted by Samuel Rowbotham (and other
sola Scriptura heretics) was unable to infiltrate the Church before her safeguards to the Faith were dismantled.
The Church allows both theories. Until She teaches clearly, you can't say flat-earth is any more wrong than globe earth.
Yes, both theories are allowed as a matter of science. But she does not allow claims that Scripture teaches flat earth or that people who accept globe earth are denying the authority of Scripture. These claims are interpretations of Scripture that contradict Church teaching. It would similarly be wrong if supporters of globe earth claimed that Scripture teaches the earth is a globe. The Church has clearly taught that Scripture has no intent to teach on this subject.
St Thomas was *slightly* wrong on the Immaculate Conception (which in the 1200s was not yet defined), but this doctrine was no less implied. Many others were *majorly* wrong about the Immaculate Conception, which caused the Church to investigate and determine that the Immaculate Conception WAS implied in Scripture and also explicitly taught in Apostolic Tradition. Thus, now, it is an explicit doctrine; formerly it was only implicit.
Yes, implicit doctrines can change to explicit doctrines. But the teaching in
Providentissimus Deus that Scripture does not intend to teach on matters like the shape of the earth is not going to change to a doctrine that Scripture teaches the earth is flat. The Church does not contradict herself like that.