I realize this is 2 months later and you probably test your water regularly, but a similar thing happened last week to my little veiltail. He was having a buoyancy issues, swimming funny and "standing" on his tail. He was also laying on his tank decorations and puffing his gills like he was gasping for breath. He struggled to get to the surface to breathe. I thought maybe he'd been injured or was having swim bladder problems, and when I tested the water the ammonia levels had spiked. I brought them back down but he died overnight and I'm pretty sure it was due to ammonia poisoning.
I'm sure you do this already but double check your ammonia levels just in case that's what did it.
I'm so sorry you lost him