Please check your appointment order for separation clause.
Normally they will mention regarding period of notice in case of resignation. As per your statement I think your employer is forfeiting salary against shortfall in notice period. If you were able to serve full notice period then you can inform your employer and request them not to adjust salary against notice period.
Please check your appointment order on this clause.