The mayor of Greater Manchester said those calling for loyalty were "underestimating the peril the party is in".