When my family is home, it gets harder because I am constantly distracted then. When this happens, I first let them know I will be unavailable and ask if there is anything they need from me before I become unavailable. If they need something, I attend to it. Then I put headphones on so I can’t hear them (because noise really distracts me). I often still gets distracted in this case, but I just keep trying!
Perhaps budget time for deep work before breakfast or exercise (1-2 hours) and use the gym or breakfast as your reward.