Yes, but so far it’s only being done in deep blue states like CA and MA. If only blue states do it (and it is unlikely red states would do it exactly for the reasons you point out), then it means a Democrat cannot get elected President unless he wins the popular vote, and any GOP candidate who wins the popular vote will necessarily have an electoral landslide.
It could backfire on the Dems.
And I’m hoping it does!
Because, as it stands, GOP candidates will campaign HARD in GOP-leaning states (none of which have enacted this law), AND blue states since raw numbers will help them.
The states that have approved that stupid national-popular-vote “compact” won’t hand out their EVs based on the national popular vote unless enough states to encompass 270 EVs have signed on to the “compact.” Doesn’t make them any less idiotic, though.