As far as I know, they still had Berlin at the time of surrender. Was it because of the invading soviets from the East?
No, they did not hold Berlin at the time of the surrender. The Soviet assault on the city began on April 20th and concluded with General Helmuth Weidling's surrender to General Vasily Chuikov early in the morning of May 2nd. Weidling was, after the rapid Wehrmacht command turnover of the preceding two weeks, the Berlin Defense Area commander. Fighting outside of Berlin proper did not entirely conclude on May 2nd, but from that point on the Soviets definitively had control of the German capital. Weidling's surrender came two days after Adolf Hitler's death, and five days after the Red Army had entirely encircled Berlin. The final German surrender came on May 8th.