Muscle loss is going to happen when you are dieting. Unfortunately it is unavoidable. DO NOT let this steer you away from weight training, because it helps to reduce muscle loss. Are you doing cardio as well? It may be a good idea to pull 30 minutes or so away from your weight training and do cardio in its place. 2 hours of lifting is a bit long if you are eating a deficit of calories.