Now, this is a very interesting question.
It is clear that anyone who "shall marry a Papist" is barred from succession and heritance of the Crown (by the Bill of Rights 1688/9, Not the Act of Settlement 1701, as often said. The latter merely repeated the prohibition on Papist marriages ,and referred the penalties thereof to the earlier act).
But, the Royal marriages Act 1772, declares that if any descendant of Sophia, being also a descendant of Geo II, who shall marry (anyone) without the consent of His Majesty .. declared in Council.. entered in the books.. etc ; then ... every marriage, or matrimonial contract, of any such descendant, without such consent first had and obtained, shall be null and void, to all intents and purposes whatsoever.
So, the question may be posited, if such a marriage is null and void to all intents and purposes whatsoever, then it is in fact, no marriage. The persons so purporting to marry are not in fact married at all, and the operation of the Act would be a good defense to a charge of bigamy should either of the persons later marry another person (with requisite permissions and consents), the other party still living.
It might therefore be submitted, that a marriage null and void for all purposes is null and void for the purposes of the Bill of Rights and Act of Settlement. The marriage between the PoW and Mrs FitzHerbert, being null and void , was no marriage, and therefore the Prince did not marry a Papist. Indeed, if this were not so, then the Prince's later marriage (with consent) to Caroline of Brunswick would have been bigamous, and the offspring of such 'marriage' (the quondam heir presumptive , Princess Charlotte), illegitimate.
It is possible that any revelation of the Fitzherbert relationship after 1797 would have been countered with an argument along these lines.
It must be said that the Royal Marriage Act is a most ill conceived and poorly drafted piece of legislation.