From what I know, religion in the USSR and its satellite states was never outright banned but was heavily discouraged which (apparently) is the reason why East Germany is so irreligious. Though despite this, pretty much all of the former Warsaw pact countries, especially Poland, and even Russia itself are overwhelmingly religious to this day. Except for east Germany, where it is known as being one of, if not the least religious places on earth. So why was the USSR so successful in supressing religion in just eastern Germany, but not even itself or its other satellite states?
I feel like talking about Poland a bit first is important here, because Polish Catholicism is quite unique in the Eastern Bloc. The largest factor here is, in my view, the extent of the church’s institutional power in respective Communist states.
Poland, a Catholic state, had longterm influence from the Catholic Church, which held an active role in the various Dioceses of the region. It thrived as an independent institution outside the state. Further, whilst Nationalism often developed in opposition to the role of the Church in much of Western Europe, the resistance of the Catholic Church in occupied-Poland to both Russification and Germanization in the 19th century meant Polish nationalism effectively embraced Catholicism as a staple of its identity. Thus, Soviet Domination meant the Polish Catholic Church was both a local, independent institution that could resist Soviet domination and act as a hub of political resistance. Groups like Solidarity could more effectively mobilise with the financial and political cover of the Church. The Church thus could withstand persecution, and held continued social and political relevance until 1989.
Now, East Germany is a different case. It was the only majority Protestant State of the Eastern Bloc (Besides the Estonian SSR, which is also incredibly irreligious today.) Here, the Protestant Church was deeply marginalised in its independence throughout the 19th century. The authoritarian nature of the German Empire meant the various Landeskirche of the Empire became embedded into the national state. The Protestant Church was integrated into state power and increasingly relied on the state for that power.
The 1919 Weimar Constitution abolished State Churches, and left the various Protestant Churches of Germany without access to the state-backed power they once enjoyed. Unions of the various denominations proved politically difficult, and their loss of power under the new Secular state led to their weakness during the Nazi Era Kirchenkampf. (Many East German Protestants in particular were more loyal to the Nazi state than Protestant resistance.)
Thus, when the GDR came into existence, the various Protestant churches had no effective institutional power and could be more effectively suppressed by the SED. The Protestant Church could not provide the same political, social or national utility as the Catholic Church did in Poland. Its loss of political independence in the 19th century had sealed its fate in the 20th.
In short, German Protestantism became reliant on a state which eventually turned on it, whilst Polish Catholicism retained its autonomy and thus couldn’t be suppressed in the same way.