I'm not sure that there isn't a link in some countries with this and the changes to marriage laws.
In some places those changes happened as a kind of policy initiative, but in others it was a court decision based on rights claims. And in places like the US and Canada, the courts can almost act as legislators in a way that isn't quite the same in the UK.
The difference being, if you decide to legislate for sex not to be relevent in marriage laws, that's a pretty straigtforward and limited idea, sex doesn't matter in lots of legal institutions. But if your courts determine that it's not legitimate to have biological sex impact on a legal institution, that is rather different, because it potentially suggests that biological sex is not a legitimate category under the law at all.
Now would that ever happen, I don't know, but I think it has certainly shaped the way some people, including people in Parliment and the American Congress, think about it.