Apparently it was because of his position that they kept their relationship a secret for decades despite the strain it caused Thomas. Not surprising, really (though it would be interesting to know exactly what he is referring to), but it is certainly a reminder that changes in law (where the former ruling house has been demoted to almost private citizens with no special obligations and legal recognition of marriages no longer has a gender restriction) do not automatically transfer into societal changes. Even now, Duke Franz will be hosting lavish wedding celebrations for his much younger cousin Ludwig while a public marriage to his partner of 42 years (longer than Ludwig has been alive) is most likely still considered off the table.
That was seemingly also the case in Bavaria, where succession to the throne was generally interpreted as requiring birth from an equal and approved marriage:
The fact that the constitution of Bavaria makes the legitimate birth requirement is to him proof that this is the implicit meaning of those house laws. This seems to be the majority opinion of publicists (Schulze, Zachariä, Rönne, etc.)
Bavaria, house law of 1816, article 24: "Zur SuccessionsFähigkeit wird eine rechtmässige Geburt aus einer solchen Ehe erfordert, welche von dem königlichen Hause als standemässig anerkannt ist."
constitution of 1818, title 1, art. 4: "Zur Successions-Fähigkeit wird eine rechtmäßige Geburt aus einer ebenbürtigen und mit Bewilligung des Königs geschlossenen Ehe erfordert."
https://www.heraldica.org/topics/royalty/legmatsub.htm#throne
The state law which organizes the Wittelsbach compensation fund restricts the continuing compensation payments to individuals who would have received a state appanage under the laws of the defunct Kingdom of Bavaria. (Yes, a state government of Germany in 2023 is choosing to pay public revenues to men but not their married sisters...). If a legitimated child would not have been entitled to a state appanage prior to 1918, then choosing him as head would, if I understand it correctly, separate the headship from this income.
I believe the Duke's position as the head of a Catholic royal house and the sovereign of Catholic orders of knighthood makes it difficult for him to have a same-sex marriage.
As far as I understand, Catholic teaching does not require a gay man to stop being gay (which is not possible anyway as it is part of the person's nature/identity), but Catholic men who are gay are expected by the Church to be celibatarian.