As usual with question of this sort, the answer is 100% to do with the (unpredictable) properties of the particular word that governs the clause.
It happens that unaccusative verb prove (meaning turn out, be found to be) takes:
an adjectival complement, eg The mold on the plants proved benign.
a to-infinitve clause, eg The mold on the plants proved to be benign.
If cannot take a gerund clause, and cannot be turned round to make the clause the subject. I cannot detect any difference in meaning between the two, but I think the shorter form is more literary.
There is no way I am aware of to calculate or prove that this is how this prove behaves: it is an unpredictable fact about current English.
(Note that the transitive verb prove, meaning demonstrate the truth of, or establish as true can take a that clause as its object (He proved that the mold on the plants was benign). But the unaccusative verb I discussed above is not simply the passive of this prove: while it has an implication that somebody investigated the matter and found the answer, it does not have any sense of demonstrating that it is true).