Keeping my remote Job with MSC in Berlin
Both at the same time seems quite unfeasible. A degree in Germany is generally considered to be a full time thing by itself, not to mention the additional work of living in a foreign country, having to deal with German immigration and bureaucracy (which apparently is a special nightmare in Berlin).

I would say the question boils down to where you want to be in five years. If you can see yourself living and working full time in Germany, then the M.Sc. is the clear way to go. As far as I know, if you finish a degree on a student visa, you can to transform it into a work permit if you can find a job within a few months afterwards. If you want to ultimately stay in Uganda, then maybe keeping the job is better. But I don't know how much a European degree is valued there and if it could get you an even better job.

If you really need the money, asking the company to reduce your hours might be another option, but if you go your time is best spent studying (and possibly learning German).