Queen Mary does not (need to) curtsey to Queen Margrethe.
On the revised Danish Royal website, the Royal Family listing has HM Queen Margrethe first at the top. There was really no other way to present it I suppose.
(Open the hamburger menu on the right.)
https://www.kongehuset.dk/en/
232