Aww sorry to hear that! RIP little snaily.
I can definitely say it isn't uncommon for them to float, in or out of their shells though. So don't be too concerned if you see others do it! When I first got my purple mystery from Peachii and set her up in a QT with some plants and driftwood she was so happy, climbing and parasnailing and doing all sorts of fun stuff.
Then I did a water change and took out the wood to add to my tank. Well Agent Dunham (that's her name now) was NOT happy. She would clam up and float, or some times hang out of her shell floating. I read that they can get air bubbles trapped (which upon further reading it seems to be rare that its really trapped, they can control it) so I tried to turn her upside down under water to release it, no luck. I was so worried she was dying, or dead. Every time I did a full water change (it was a smaller KK and snails poop a lot!) she seemed more shut away. But I didn't add her to my tank as I was medicating.
Anyway long story short, as peachii said her snails are drama queens
Once she adjusted to my 10 gallon the floating and closing up decreased, but she still naps like that every once in a while. usually she just sits on the bottom half out of her shell to nap now though, and half the time looks dead.
They are really cute though, such characters! Enjoy the others