Hi, the second one is the correct placement of the adverb. You can test this out yourself by replacing "astonishingly" with "well" or "poorly" as an example.
If you said:
(1) Astonishingly, she did really well in the exam
This would have a slightly different meaning to:
(2) She did astonishingly well in the exam.
In the first instance, the astonishment is from your point of view, so you are astonished as to how well she did. She may not be astonished at the result, from her point of view.
In the second instance, she did so well, it was astonishing. This is from the overall point of view, so it is astonishing to everyone including her.