My view on Tonks dying was that she was going to follow Lupin no matter where he went or what he did.
In an earlier book she left her “post” unguarded to find out if Lupin was alright. That is why she was wandering the halls in Hogwarts when Harry ran into her.
Then she again left her “post” which this time would have been her obligation to stay alive for the sake of their new baby to follow Lupin into the fight.
It seems to me her highest priority had always been Lupin, so it made sense if he died, she would die also.
Maybe?
Or be doomed to live a sad shadow life in mourning.