When I play bedrock Minecraft on a server, or in a friend's world, I get kicked out of the server/friend's world when I go into the browser, for example, to turn on music, or when I go into Discord, and then go back into Minecraft, I'm already in the menu, not on the server, or not in the friend's world. The thing is that I don't close Minecraft, but simply go into the browser without exiting Minecraft, and when I go back into Minecraft I'm no longer on the server.
This issue is being tracked at MCPE-109879.