Hitler's church membership (if not his personal religious allegiance) is a fact of history.
Don't be sophomoric. Excommunication is the procedure to FORCE an exit of the Church. People are free to leave at any time, and lots of people do. They become Protestants and agnostics and atheists and even Jews and Muslims.
If they've departed and no longer consider themselves Catholic and no longer believe Catholic teachings and no longer avail themselves of Catholic sacraments, they're NOT Catholic.
I can't tell if your error is an innocent mistake or an effort to smear the Catholic Church with all things Nazi, as though Nazism were somehow consistent with Catholic teaching and the Church approved of genocide and wars of conquest as practiced by Nazi Germany. Throw the Hitler tarbaby at the Church all you want, it won't stick and you'll only come out looking shabby.
For example, if a Catholic performs an abortion he is immediately excommunicated without any need for an official Church statement. Such a person is no longer a Catholic the moment they commit this crime.
Likewise, voluntarily taking membership in a secret society is an act which automatically excommunicates the individual who does it without any need for a formal act of the Church.
Adolf Hitler joined several such societies in pre-WWI Austria and Bavaria - many of his closest associates whom he later appointed to positions of influence were his brothers in a number of quasi-Masonic secret organizations such as the Thule Gesellschaft, the Germanenorden, the Neutemplaren and other volkische secret societies.
Hitler's memberships in these societies definitively excommunicated him from the Church certainly by 1912, perhaps earlier.
Added to this is the fact that Hitler ceased attending Mass or participating in any Catholic capacity altogether following his father's funeral in January 1903.
By 1905 in Vienna he was already involved in Bohemian theosophist and volkische circles.
According to Mein Kampf he was already associated in 1907 with the Los von Rom movement in Vienna. Los von Rom had as its slogan - which Hitler admiringly quotes in Mein Kampf - the following poem:
Ohne Jude, ohne Rom
Wird gebaut Germaniens Dom.
Literally translated, it means: "Without Jews, without Rome will Germania's cathedral be built."
It was a protest movement that began in Austria in 1897 among German nationalists living in the Austro-Hungarian Empire. Many German-speakers were enraged that non-Germans, like the Hungarians, enjoyed full equality and a measure of ethnic autonomy in the Empire. They blamed the Jews and the Papacy for seducing the German-speaking monarchs of the Empire into an arrangement in which Germans had become an ethnic minority in the larger Empire. German nationalists yearned to become part of the Prussian Empire, which was a "pure" German nation and to escape the "mongrel" Austro-Hungarian Empire.
Members of the Los von Rom movement realized that the glue that held the Austro-Hungarian Empire was the Catholic religion, not ethnic identity and they advocated the secession of the German-speaking lands of the Austrian Empire, hoping to incorporate these lands into the Prussian Empire.
As a political move, most of these nationalists left the Church and became Lutherans or atheists and when it became clear that secession was impossible, thousands of these anti-Catholic, anti-Semitic German nationalists crossed the border of the Prussian Empire and lived there as voluntary exiles of the nationalist cause.
This is exactly how Hitler describes himself in Mein Kampf - he tells of how he came to Vienna, became a radicalized German nationalist in the Los von Rom movement and how he dodged military service in Austria, preferring to volunteer for the Kaiser's army instead.
Hitler was a member of banned anti-Catholic secret societies, joined an openly anti-Catholic political movement and was such a committed member of that movement that he emigrated from his country as an act of protest.
Hitler hated the Catholic Church, deliberately took acts that he knew excommunicated him from the Catholic Church, joined a political movement opposed to the Catholic Church, went out of his way as a politician to humiliate representatives of the Catholic Church and, as a dictator had hundreds of Catholic priests executed.
Muawiyah, get your history straight and abandon the bigotry that secuces you into falsifying the past for your own polemical purposes. The father of lies is the Devil.