It seems that in recent versions (1.21.131), at least on switch, the data being sent for player 2 now uses both the name and XUID of player 1.The data being sent for player 2 is:
{ nbf=1766084826, extraData={ identity=redacted, displayName=redacted, XUID=redacted, titleId=redacted, sandboxId=RETAIL}, randomNonce=-835051032898776294, iss=Mojang, exp=1766171286, iat=1766084886, identityPublicKey=redacted }
which matches the xname and xid of the data sent for player 1 (shown below):
{ sub=redacted, ipt=PlayFab, iat=1766084841, mid=redacted, tid=redacted, pfcd=redacted, cpk=redacted, xid=redacted, xname=redacted, exp=1766099241, iss=https://authorization.franchise.minecraft-services.net/, aud=api://auth-minecraft-services/multiplayer }
All of the redacted data does have values, but the notable portions are xname, xid, displayName, and XUID. The formats of data sent between player 1 and player 2 are also quite different.
Turns out the bug was due to some corrupt file.
It seems that in recent versions (1.21.131), at least on switch, the data being sent for player 2 now uses both the name and XUID of player 1.
The data being sent for player 2 is:
which matches the xname and xid of the data sent for player 1 (shown below):
All of the redacted data does have values, but the notable portions are xname, xid, displayName, and XUID. The formats of data sent between player 1 and player 2 are also quite different.