There are three scenarios for reconciling the work and the doctoral thesis or the master's thesis, the first of which is: you can give the work all the time and give the thesis some time, second: the equality between working time and working time in the thesis, third: giving the work some time, and giving the thesis all the time.
You cannot lose anything, the work in a thesis is an investment in the science that is reflected in the work.
I think this is a common scenario and one I faced all through my thesis. It generally means you need to work on your PhD throughout your personal time (evenings, weekends, holidays) in order to make progress. I would recommend finding what part of the day you are most productive in (eg early morning, late evening etc) and then trying to work on your thesis for at least one productive hour per day. Give yourself lots of weekly goals to make best use of time as well. Connect up with other PhD researchers who are in this situation too, and encourage each other.