Ironically, what you are arguing is much like the chief scientific error Galileo made: offering a sufficient condition for an occurrence does not prove that this condition caused the event. Him being tried and convicted of heresy doesn’t mean that his trial wasn’t politically motivated. Despots make up charges for political enemies constantly throughout history and heresy was an obvious choice
The Pope had been a fan and political ally of his within the church even before his ascension, and Galileo didn’t just disregard his request for a discussion of geocentric theory but did so in a way that specifically called him an idiot and undermined his authority. The Pope, who was essentially the ruler of central Italy, couldn’t let that public ridicule slide whether or not Galileo intended it (historians think the slights were unintentional). This led to his second trial for heresy for which he was convicted.