This serious incident is referred as a « QNH blunder error » and one way to avoid being in that situation is to always preselect your destination QNH and when tower gives you the QNH, pilots should also crosscheck with the last ATIS.
Mentour Pilot did a very good video about this incident —>
Airbus also released an article on this case in their Airbus safety First #35.