Very strange minecraft death
Solution 1:
As a fellow Nintendo Switch player, I would advise you to always save and quit properly. While going to the home menu does suspend the app, the game still runs the world for a little while before actually stopping the game fully (about 5 minutes is my guess, but Minecraft is always slow and buggy anyway on the Switch :p). As the game is still kind of unstable on the Switch, it may kick to the main menu, and other unexpected behaviors may occur upon returning (nothing major, just freezing and UI glitches, and reloging into the game should fix that).
On a side note, your brother was kicked since the Switch stops online activity when suspending an application. So, he was forced out while you stayed logged in. If you by chance were kicked to the main menu, or you quit the app before you played again, then the chat would have nothing to say since the chat clears on the client when you exit a world or server. I assume that your stuff is still there because it is in an unloaded chunk. So, mobs would despawn, and your stuff would stay until a player enters the chunk (in this case your brother. I would have him pick up your stuff for now if you were far away.
All in all, the Switch version can be buggy at times, so try your best to save and quit to make sure nothing happens. And as a tip, if you are ever on a realm or server, make sure to log off in a safe place, as you do stay half logged in for about 5 minutes, and things can kill you.
Solution 2:
I've seen situations where, if the server shuts down unexpectedly, player data files can be corrupted. When rejoining the world, the game treats your inventory as if it's a new player