Lately I've started learning some basic music theory and I have been trying to rationalize some of the interesting chords I have heard of from famous pieces. Here is an example of which I am not sure if my understanding is correct.
Below are bar 11-12 from Mozart's Piano Sonata No.11 in A major, K.331. I have marked the chords using Roman numeral notations.
The blue text shows a naive marking. To me the ♯iv° chord gives a warm and sweet shifting feeling. I found that if I think of it as an applied chord (by tonicizing V) then the last three chords becomes a (vii° - IV - I) progression. If this is the case I was wondering how come the IV chord, as a pre-dominant chord, appears after the dominant chord vii° instead of before it? Why would the progression still sound inevitable when the strong dominant -> tonic progression is broken?
Per @Dekkadeci's answer I revised the analysis as follows. The final three-chord progression simultaneously resolves two tension (cadential I chord to V, and on the V scale, dominant vii° to tonic I.