Maybe. Again, it is for you and your partner to try and reach agreement on this as part of the allocation of assets. Sometimes, where finances allow, the parent who has sole custody of any children of the relationship will carry on living in the family home.
You should not assume that that will happen; other arrangements could be put in place. For example, you and your husband or wife could agree to sell the family home, split the proceeds of sale, and each buy a new house. Your divorce solicitor will be able to discuss the options for this, and all other aspects of the separation, with you.