But then you have the rise of Adolf Hitler - an Austrian from Upper Austria - in Germany, focusing on race and heritage.
Add civil war in 1934, austro-fascism under Dollfuss (https://en.wikipedia.org/wiki/Engelbert_Dollfuss) - quite a time. Dollfuss tried to ban the Nazis, got murdered, fini.
Keep also in mind that even the German nation state was net new, before that it was Prussia plus a lot of smaller "states". Austria had less business of being a nation than Bavaria.
1945 saw Austria being separated out again, 1955 forced movement into a neutral statehood. At all times it was closely coupled to Western-Germany, as exemplified by tieing the national currency (Schilling) to the German D-Mark.
To this day you have a strong element of German-Nationalism within the far-right movement in Austria. Late populist Jörg Haider of the Freedom Party went on record calling Austria a ideological miscarriage in 1988.