Is there an flat unordered pairing function in ZFC? Is there an unordered pairing function that does not increase rank whenever the max rank is infinite, in ZFC? An unordered pairing function is one such that $f(x,y)=f(z,w)$ iff $(x=z \wedge y=w) \vee (x=w \wedge y=z)$.

First, let's look at the special case when $x\cap y=\emptyset$.
Here, we can define a disjoint unordered pairing function: $\langle x, y\rangle_d=\{[a, b]: a, b\in x\}\cup\{[c, d]: c, d\in y\}$, where $[\cdot, \cdot]$ is the flat (ordered) pairing function of your choice. The point is that from $\langle x, y\rangle_d$ we can recover the set of elements of $x\cup y$, and moreover tell when two elements "belong together" - and this is enough to determine $x$ and $y$, up to swapping.
In general, we can do the following: for $x, y$ sets, let $$\langle x, y\rangle=[\langle x-y, y-x\rangle_d, x\cap y].$$ I believe this works.
