As a general rule, a person cannot burglarize his or her own residence.
However, the situation you describe is complicated. It is possible for a person to relinquish the right to occupy a residence to another and relinquish the right to at will enter that residence. Did that happen in your case? I do not know. Without a full case review, I cannot give an opinion on that.
This is an issue you need to take up with a reputable criminal defense lawyer in the city where it went down. That lawyer can give you a better idea of how the prosecutor's office may view this.
Answers on Avvo are for general information purposes only and should not be relied upon as legal advice. No attorney / client relationship is created by providing this answer. For specific advice about your situation, you should consult a competent attorney of your choosing.