I have been seeing a similar symptom on and off for about the last two months.
Scenario:
Nintendo Switch
Nintendo Online account for main user (parent)
Both kids are in the Nintendo Online account as a family
Microsoft Realms subscription for the main user (parent)
Both kids also registered in the Xbox Family account with MS accounts
When playing in Online mode in either
A friend’s world on their PC
A REALMS world
the same happens: second player can join, loading screen, screen gets split, then second player immediately gets booted and returns to non-split screen.
This has been intermittent with worlds hosted on PC, but pretty consistently non-functional in REALMS over the last week.
Note that the problem doesn’t seem occur when joining a friend’s world on their Switch.
One of the host PCs is on Win10.