Ok…this may be a little tricky. Prior to separation this would have been considered marital since you both had access and I assume it was rented while you were married instead of prior to marriage.
Since you both had equal access to it and it was not a residence, I don’t believe that there can be much done about it.
I have a friend who’s wife left and took all of HIS stuff with her. He had to file for ED before he was able to get it back and that may be what the judge will tell you; that you should have file ED to get possession of your belongings. Or contacted the owner and requested access of the unit to remove your belongings. You could have also sent her a letter of intent stating date and time you would be at the unit to remove your belongings. Without a separation agreement, and since you replaced the lock and gave her the key, I’m not sure that there’s not much that could have been done. Maybe the attorney will chime in on this one…
No you could not have kept her out of the apartment, regardless of whether or not the lease is solely in your name. That’s grounds for divorce from bed & board for malicious turning out of doors.