This is an apparent workaround: How To: Fix "Locating Server" Glitch on Minecraft Bedrock! https://youtu.be/xyl37mMzoMQ.
I can confirm that using the HARMING POTIONS worked for my case as described in the video. It required three potions.
Also, worth noting that we had tried enabling friendly fire but couldn't damage the stuck player.
Also tried boxing in the player and pouring lava on them - - no damage to the player! They would show as burning but no damage was incurring.
Also tried placing a campfire under the stuck player - - no damage to the player.
I'm experiencing this same issue. It is only affecting one player in my case. Other players can successfully join this world. Also, the affected player could previously join without issue (for weeks). This is an iOS world, and the size of the world is 68.6MB.
We tried copying the world to the affected player's device that couldn't join (also iOS). That affected player could open the world on their device (they had my inventory), and I was able to join that world on their device from my iPad.
We tried making a copy of the world locally on my device, but the issue persisted in the copy. The affected player couldn't join that world either.
The affected player's character/skin was visible in the game when they attempted to connect even though they were stuck on the "Generating world" / "Locating server" screen. We tried building blocks over the area where the skin was appearing but the skin still appeared inside the blocks, and it still hung on "locating server".
We also observed the message noted in the description of this issue of "...player left..." when they cancel the "locating server" screen. We never saw a "...player joined" message.
This problem did start after 1.16.50 was released (which I believe was released around Sept. 22, 2020). However, I don't believe it immediately started after the update. I believe we first encountered this issue some days, maybe a couple of weeks afterward (closer to the date I first posted here on Oct. 16).
We login to the Minecraft profile with a XBOX/Microsoft account. The world that was hanging was on a local LAN (that player also was logged into the Minecraft app with a XBOX/Microsoft account). As noted before, this issue was only affecting one player in one world. The same player could join other worlds on the same LAN. And, another unique player was able to join the same world that the affected player could not join.
Yes, the affected player could access marketplace, servers, and other worlds on the LAN.