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.
I am using OptiFine
Yes, but that isnt the problem the problem is that when for an example i am on slot 7 i middle click a block and it puts the block on slot 8 NOT slot 7!
One of the host PCs is on Win10.