Frederiksen had sought to capitalize on popular support after standing up to Trump’s push to annex Greenland, a self-governing Danish territory.