Not at all. Undoubtedly you heard the term "abandonment" from a friend or family member. This concept is antiquated and not truly relevant today. It is a free country. You can leave your home anytime you want.
However, unless there is abuse or danger in the home, I always recommend staying in the home or only leaving for short periods of time. Once you permanently move out of a home, you may have difficulties getting back in.
If you have children, leaving them at the home with your spouse conveys a message that you are fine with that spouse caring for the children and will require you to explain why that should change long-term.
Leaving the home also means losing control over information. Divorcing parties are at a disadvantage if they do not have access to income statements, retirement statements, tax records or other documents which are typically stored at the home.
Put simply, unless there is danger in the home, you should typically stay.