It is intentional - but for reasons of affinity.
The director is using a technique called Affinity of Continuum of Movement.
There's a good discussion on it here:
And a breakdown of it here: https://www.jukolart.us/visual-structures/continuum-of-movement.html
In the scene from Hanna, the director wishes the visual focus to be on the girls' faces, but he especially wants the audience to listen to what they're saying.
We start off with Hanna on the right-hand side of the frame. We then switch to Sophie. If the director had kept Sophie lying correctly on her right side, then Sophie would have ended up on frame left.
This would have created a visual contrast, making Sophie appear to be in opposition to Hanna. It would also force the audience to shift their focus, thus losing track of the conversation.
Instead, the director keeps Sophie on the right. The audience doesn't have to switch their focus, and the two girls are seen as sharing the same ideas and being in parallel to each other. Notice that Hanna and Sophie are in the same pose - lying on their sides, hands under their head.
By keeping both girls in the same position in the frame, the director creates in the audience's mind a positive affinity; the relationship between the girls is seen as growing and warm, rather than in opposition.
So yes, seen from a logical standpoint Sophie's position is physically incorrect, but in fact we are shown a growing emotional bond that is important in Hanna's emotional development.
Personally, I never noticed the incongruity in their positions. I only saw them growing close, and was able to take in their conversation easily. Which, I think, was the director's intent.