Thank you for your enquiry.
One of the requirements of a family-based application and in your case as a partner (spousal visa) is that your relationship is genuine and subsisting.
If you separate from your husband, you would no longer meet the requirement and would have to apply on your own accord and this may require you to leave the UK to apply for entry clearance.
I hope this clarifies your question. Please rate.