Dissociation is a way that our brain has learned to cope when things get overwhelming. So, it's always going to be there as a coping strategy in your brain's Coping Toolbox.
But as you go through the healing process, your brain won't become as overwhelmed as quickly, and you will gradually learn other, more helpful coping strategies to add to your Coping Toolbox.
So it doesn't "go away" so much as become less and less needed.