I am not a constitutional expert. But looking at the 12th Amendment there is a lot of detail about the Electoral College. There doesn’t appear to be anything specific about any constitutional obligation that the electors assigned have to follow from a popular vote for President and Vice President. It might be that states using popular election results to assign electors is based on a norm that has developed over time. If so, norms change when circumstances change.