Since the chase the skies update splitscreen has not worked properly. Any player trying to join locally, even after selecting their Nintendo account, will join as a copy of the 1st player account. For example the gamer tag for first player is “gamer” the 2nd player to join will be “gamer(0)” then the 3rd to join would be “gamer(1)”.
Individually each account can log in fine but when trying splitscreen only the 1st player is linked to their account.
This applies to the Realms also
This issue is being tracked at MCPE-222048.