Bear in mind I have never dabbled with the world map, let alone the new data provider code. So what I say below may be utter garbage rofl. But just in case it isn't.
Looking at Blizzard_WorldMap addon, I see multiple types of pins, so it might depend on which type of pin you have based your pins on.
From:
https://www.townlong-yak.com/framexm...taProvider.lua
function WorldMap_WorldQuestDataProviderMixin:RefreshAllData(fromOnShow)
> This appears to be for the various quest related pins and includes a call to *clear and refresh* the pin data.
From:
https://www.townlong-yak.com/framexm...taProvider.lua
function WorldMap_EventOverlayDataProviderMixin:RefreshAllData(fromOnShow)
> This one clears the pins, and then recreates them based on the current events
From:
https://www.townlong-yak.com/framexm...d_WorldMap.lua
function WorldMapMixin:RefreshOverlayFrames()
> This one might be useful if your pins are part of your own overlay frame.
Hopefully these will offer you some ideas on what might work for you
Good Luck.