In our history, austria lost miserably against Prussia. What would have to change so that Austria would have a chance against Prussia?
Yeah, pretty much this.Which war?
In the First Silesian War you can have Austria preemptively defeat Prussia at Mollwitz, better scouting (and better yet not having their scouts caught) can stop Fritz's ambitions in Silesia quite earlier (though it would be sheer luck, as the Prussian military as whole was much more powerful than their Habsburg rivals).
In the Second Silesian War (halfway through the WotAS) it's impossible, Austria is too overstretch fighting a lot of people to focus on Prussia (and as I said they were in fact much stronger than the Austrians).
In the Seven Years War, no miracle of the house of Brandenburg.
In the Austro-Prussian War, better reforms after the war with France, plus better leadership, can make the Habsburgs stomp Moltke's army at Könnigrätz.