Phase transition of the 2-Choices dynamics on core–periphery networks