When the command Preview World Map is used while my visual studio code environment is that of my mod. A old version of the world map seems to be generated. When the environment of visual studio code is changed to the installation folder of HOI4 the correct map is generated.
It turns out that apparently I have a second installation of HOI4 on my computer that it recognized and that version is outdated so the outdated map came from there.
When the command Preview World Map is used while my visual studio code environment is that of my mod. A old version of the world map seems to be generated. When the environment of visual studio code is changed to the installation folder of HOI4 the correct map is generated.