I want to know because I accidentally enabled cheats on my realm (which forever disabled achievements), so in order to get achievements again I have to upload a world (a copy of my realm) that didn’t ever have cheats activated. But I can just use an NBT editor to make that happen. I’m not able to edit the realm directly though because that’s stored in Minecraft’s servers and not to your device.
So if I upload a world to realms, do all the players’ inventories stay with them or are they emptied?