Mette Frederiksen’s party suffered its worst election in over a century, despite her defense of Greenland and confrontation with Trump.