How to ease the edges of a volumetric texture?
Using another Shape is indeed not a bad idea. (@Jachym Michal)
But here is a node setup to give you pretty good controll of the density border.
For better visibility I haven't multiplied it with your current density setup yet, but the math node already is sitting in place as you can see.