His hug of Mamdani left his strongest media defenders sputtering to spin their months of following the president’s lead and condemning the socialist.