The opposition by the church was two-fold. It was on the grounds that Galileo had not sufficiently proven the Copernician system. Nevertheleless, it endured 9 popes before controvery was stirred up when the debate moved into the venacular and his theory started getting pitched against Scripture, instead of just continuing the debate among astronomers.
But even the authors of the judgement against Galileo didn't consider it final, as Cardial Bellarmine wrote:
I say that if a real proof be found that the sun is fixed and does not revolve
round the earth, but the earth round the sun, then it will be necessary, very
carefully, to proceed to the explanation of the passages of Scripture which
appear to be contrary, and we should rather say that we have misunderstood
these than pronounce that to be false which is demonstrated.
Also there was no prohibition to continue to discuss the theory in the context of Astronomy, just to stop making claims about validity of scripture (which is what got Galileo in trouble later in life).It's worth noting there have been many scientific discoveries advanced by churchmen or churchwomen which on the surface appeared to contradict points of doctrine. However, the scope of the two are different and can coexist. This happened again with George Lemaître, who formulated early hypothesis about the Big Bang, concerning himself with the "how", not the "why" and resisting concordism arguments.