I have the EXACT same problem as the commenter Jane Austen from July 13, 2021 at 3:15 AM. I and a friend play split screen, and I lose my inventory, but he does not. I spawn next to my bed, so I just put a chest there and keep my entire inventory there before we log off for the night, and I try to use all of my levels before we end the session so it's not wasted.
Same thing happened to me on bedrock on my Xbox