In Mozart's time Austria was an intergral part of Germany. Like Texas and Florida and California are integral parts of the USA.
There is one detail about the "Anschluss" that I did not know: https://www.thelocal.de/20180308/hitler-wehrmacht-annexation-austria
Austria did not annex anything in 1945, but once upon a time it annexed Salzburg. https://en.wikipedia.org/wiki/Salzburg#:~:text=Salzburg was founded as an,dates from the 11th century.